#include<iostream>

using namespace std;

int main() {
	int K, x;
	cin>>K;
	cout<<K*3<<endl;
	for (int i=0; i<K; i++) {
		if (i%2==0) {
			x=(i/2)*5;
			cout<<0+x<<" "<<i<<endl;
			cout<<1+x<<" "<<i<<endl;
			cout<<2+x<<" "<<i<<endl;
		}
		else {
			x=((i-1)/2)*5;
			cout<<0+x<<" "<<i<<endl;
			cout<<1+x<<" "<<i<<endl;
			cout<<2+x<<" "<<i<<endl;
		}
	}
	return 0;
}