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 if(k % 2 == 0) {
            int n = (k / 2) + 2;
            Console.WriteLine(n);
            for(int i = 0; i < n; i++) {
                Console.WriteLine("0 {0}", i);
            }
        }
        else if(k % 2 != 0) {
            int n = ((k - 1) / 2) + 2;
            Console.WriteLine(n + 2);
            for(int i = 0; i < n; i++) {
                Console.WriteLine("0 {0}", i);
            }
            Console.WriteLine("1 0");
            Console.WriteLine("2 0");
        }
    }
}