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

int main()
{
    ios_base::sync_with_stdio(false);
    cin.tie(0); cout.tie(0);
    int k;
    cin>>k;
    vector<int> a;
    vector<int> x;
    vector<int> y;
    for(int i=0; i<=2000; i++){
        ll cigan = i;
        int siptar = int(cigan*(cigan-1)*(cigan-2)/6);
        a.push_back( siptar );
    }

    int n = upper_bound(a.begin(), a.end(), k) - a.begin()-1;
    for(int i=0; i<n; i++){
        x.push_back(-i);
        y.push_back(0);
    }
    k-=a[n];
    int x1=-n+1, y1=0;

    if(k>0){
        n = upper_bound(a.begin(), a.end(), k)-a.begin()-1;
        for(int i=0; i<n; i++){
            x.push_back(i);
            y.push_back(100);
        }
        k-=a[n];
        int x2=n-1, y2=100;
        int m=n;
        while(k>0){
            n = upper_bound(a.begin(), a.end(), k)-a.begin()-1;
            k-=a[n];
            for(int i=(x2+x2-x1+1); i<(x2+x2-x1+1+n); i++){
                x.push_back(i);
                y.push_back(100+y2);

            }
            x1=x2-m+1; y1=y2;
            x2=x[x.size()-1]; y2+=100;
            m=n;
        }
    }
    cout<<x.size()<<endl;
    for(int i=0; i<x.size(); i++){
        cout<<x[i]<<' '<<y[i]<<endl;
    }
    return 0;
}