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

int main()
{
    int k;
    cin>>k;
    if(k==1)
    {
        cout<<1<<endl;
        cout<<"0 0"<<endl;
        cout<<"0 1"<<endl;
        cout<<"0 2"<<endl;
        return 0;
    }
    else if(k==2)
    {
        cout<<5<<endl;
        cout<<"0 0"<<endl;
        cout<<"0 1"<<endl;
        cout<<"0 2"<<endl;
        cout<<"1 0"<<endl;
        cout<<"2 0"<<endl;
        return 0;
    }
    else if(k==3)
    {
        cout<<6<<endl;
        cout<<"0 0"<<endl;
        cout<<"0 1"<<endl;
        cout<<"0 2"<<endl;
        cout<<"1 0"<<endl;
        cout<<"2 0"<<endl;
        cout<<"1 1"<<endl;
        return 0;
    }
    else if(k==4)
    {
        cout<<4<<endl;
        cout<<"0 0"<<endl;
        cout<<"1 1"<<endl;
        cout<<"2 2"<<endl;
        cout<<"3 3"<<endl;
        return 0;
    }
    else if(k==5)
    {
        cout<<6<<endl;
        cout<<"0 0"<<endl;
        cout<<"0 1"<<endl;
        cout<<"0 2"<<endl;
        cout<<"0 3"<<endl;
        cout<<"1 0"<<endl;
        cout<<"2 0"<<endl;
        return 0;
    }
    else if(k==6)
    {
        cout<<8<<endl;
        cout<<"0 0"<<endl;
        cout<<"0 1"<<endl;
        cout<<"0 2"<<endl;
        cout<<"0 3"<<endl;
        cout<<"1 0"<<endl;
        cout<<"2 0"<<endl;
        cout<<"1 2"<<endl;
        cout<<"1 3"<<endl;
        return 0;
    }
     else if(k==7)
    {
        cout<<8<<endl;
        cout<<"0 0"<<endl;
        cout<<"0 1"<<endl;
        cout<<"0 2"<<endl;
        cout<<"0 3"<<endl;
        cout<<"1 1"<<endl;
        cout<<"1 2"<<endl;
        cout<<"1 3"<<endl;
        cout<<"2 1"<<endl;
        return 0;
    }
     else if(k==8)
    {
        cout<<9<<endl;
        cout<<"0 0"<<endl;
        cout<<"0 1"<<endl;
        cout<<"0 2"<<endl;
        cout<<"1 0"<<endl;
        cout<<"1 1"<<endl;
        cout<<"1 2"<<endl;
        cout<<"2 0"<<endl;
        cout<<"2 1"<<endl;
        cout<<"2 2"<<endl;
        return 0;
    }
    else if(k==9)
    {
        cout<<9<<endl;
        cout<<"0 0"<<endl;
        cout<<"0 1"<<endl;
        cout<<"0 2"<<endl;
        cout<<"0 3"<<endl;
        cout<<"4 0"<<endl;
        cout<<"4 1"<<endl;
        cout<<"4 2"<<endl;
        cout<<"4 3"<<endl;
        cout<<"3 0"<<endl;
        return 0;
    }
    else if(k==10)
    {
        cout<<5<<endl;
        cout<<"0 0"<<endl;
        cout<<"0 1"<<endl;
        cout<<"0 2"<<endl;
        cout<<"0 3"<<endl;
        cout<<"0 4"<<endl;
        return 0;
    }
    else
    {
        cout<<"ne znam"<<endl;
        return 0;
    }
}