#include <bits/stdc++.h>
using namespace std;


int f(int n){
return n*(n-1)*(n-2)/6;
}
int Binary(int n){
int l=1,r=1000;
while(r>l){
    int mid=(l+r)/2;
    if(f(mid)>n)r=mid-1;
    else l=mid+1;
}
 while(f(l)<n)l++;
    while(f(l)>n)l--;
    return l;
}
vector <int> Used;
void Part(int n){
int x=n;

for(int i=0;i<10;i++){
    int first=Binary(x);
    x-=f(first);
    Used.push_back(first);
}


}
vector <pair<int,int> > Points;
pair <int,int> Plus(pair<int,int> A,pair <int,int> B){
return make_pair(A.first+B.first,A.second+B.second);
}
void Add(pair<int,int> A,pair<int,int> B,int counter){
pair <int,int> V=make_pair(B.first-A.first,B.second-A.second);
pair<int,int> Unit=make_pair(V.first/__gcd(V.first,V.second),V.second/__gcd(V.first,V.second));
counter-=2;
pair<int,int> Current=Plus(A,Unit);
for(int i=0;i<counter;i++){
    Points.push_back(Current);
    Current=Plus(Current,Unit);
}
}
int main(){
ios_base::sync_with_stdio(false);
cout.tie(0);
int k;
cin >>k;
Part(k);

Points.push_back(make_pair(0,0));
Points.push_back(make_pair(1000,0));
Points.push_back(make_pair(3000,1000));
Points.push_back(make_pair(4000,2000));
Points.push_back(make_pair(4000,3000));
Points.push_back(make_pair(3000,4000));
Points.push_back(make_pair(1000,5000));
Points.push_back(make_pair(0,5000));
Points.push_back(make_pair(-2000,3000));
Points.push_back(make_pair(-2000,2000));
for(int i=0;i<10;i++){
    Add(Points[i],Points[(i+1)%10],Used[i]);
}
cout <<Points.size()<<endl;
for(int i=0;i<Points.size();i++){
    cout <<Points[i].first <<" "<<Points[i].second<<endl;
    }
}