#include <iostream>
using namespace std;
int main()
{
int k;
cin>>k;
int i = 0, n=0;
int ukupno;
ukupno = k*2;
cout<<ukupno<<endl;
for(i=0;i<k;i++)
{
  cout<<i<<" "<<n<<endl;
  n=n+1;
  cout<<i<<" "<<n<<endl;
  n=n+1;
  cout<<i<<" "<<n<<endl;
  n=n+2;
}



}