#include <stdio.h>
#include <stdlib.h>

/* run this program using the console pauser or add your own getch, system("pause") or input loop */

int main(int argc, char *argv[]) {
	
	unsigned long int K;
	scanf("%d",&K);
	int br=0;
	printf("%d\n",3*K);
	long int tacka[K][3];
	
	int k=0,i=0,j,z,n=0;
	
	for(i=0;i<K;i++){
		for(j=0;j<3;j++){
			tacka[i][j]=j;
			printf("%d %d\n",tacka[i][j],tacka[i][j]*k+n);
			br++;
		}
		k++;
		n++;
		
	}
	
	
	
	
	return 0;
}