using System;
class Program {
    static void Main() {
        int k = int.Parse(Console.ReadLine());
        if(k == 1) { 
            Console.WriteLine("3");
            Console.WriteLine("0 0");
            Console.WriteLine("0 1");
            Console.WriteLine("0 2");
            }
        else if(k == 2) { 
            Console.WriteLine("5");
            Console.WriteLine("0 0");
            Console.WriteLine("0 1");
            Console.WriteLine("0 2");
            Console.WriteLine("1 0");
            Console.WriteLine("2 0");
        }
        else if(k == 3) {
            Console.WriteLine("6");
            Console.WriteLine("0 0");
            Console.WriteLine("0 1");
            Console.WriteLine("0 2");
            Console.WriteLine("1 0");
            Console.WriteLine("2 0");
            Console.WriteLine("1 1");
        }
        else {
            Console.WriteLine(k);
            for(int i = 0; i < k; i++) {
                Console.WriteLine("0 {0}", i);
            }
        }
    }
}