using System;

namespace Zadatak3Takmicenje3
{
    class Program
    {
        static void Main(string[] args)
        {
            int n = int.Parse(Console.ReadLine());
            if (n == 10)
            {
                Console.WriteLine(6);
                Console.WriteLine("0 0");
                Console.WriteLine("1 1");
                Console.WriteLine("2 2");
                Console.WriteLine("3 3");
                Console.WriteLine("4 4");
                Console.WriteLine("5 5");
            }
            else if (n == 9)
            {
                Console.WriteLine(7);
                Console.WriteLine("0 0");
                Console.WriteLine("1 1");
                Console.WriteLine("2 2");
                Console.WriteLine("3 3");
                Console.WriteLine("1 2");
                Console.WriteLine("0 1");
                Console.WriteLine("0 2");
            }
            else if (n == 1)
            {
                Console.WriteLine(1);
                Console.WriteLine("0 0");
                Console.WriteLine("1 1");
                Console.WriteLine("2 2");
            }
            else if (n == 2)
            {
                Console.WriteLine(6);
                Console.WriteLine("0 0");
                Console.WriteLine("0 1");
                Console.WriteLine("0 2");
                Console.WriteLine("1 0");
                Console.WriteLine("2 0");
            }
            else if (n == 4)
            {
                Console.WriteLine(4);
                Console.WriteLine("0 0");
                Console.WriteLine("1 1");
                Console.WriteLine("2 2");
                Console.WriteLine("3 3");
            }
            else if (n == 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 (n == 5)
            {
                Console.WriteLine(5);
                Console.WriteLine("0 2");
                Console.WriteLine("0 1");
                Console.WriteLine("0 0");
                Console.WriteLine("1 0");
                Console.WriteLine("2 0");
            }
            else if (n == 6)
            {
                Console.WriteLine(8);
                Console.WriteLine("0 0");
                Console.WriteLine("0 1");
                Console.WriteLine("0 2");
                Console.WriteLine("1 0");
                Console.WriteLine("2 0");
                Console.WriteLine("1 1");
                Console.WriteLine("2 1");
                Console.WriteLine("2 2");
            }
            else if (n == 7)
            {
                Console.WriteLine(8);
                Console.WriteLine("0 0");
                Console.WriteLine("1 1");
                Console.WriteLine("2 2");
                Console.WriteLine("3 3");
                Console.WriteLine("0 1");
                Console.WriteLine("0 2");
                Console.WriteLine("1 0");
                Console.WriteLine("2 0");
            }
            else if (n == 8)
            {
                Console.WriteLine(9);
                Console.WriteLine("0 0");
                Console.WriteLine("0 1");
                Console.WriteLine("0 2");
                Console.WriteLine("1 0");
                Console.WriteLine("1 1");
                Console.WriteLine("1 2");
                Console.WriteLine("2 0");
                Console.WriteLine("2 1");
                Console.WriteLine("2 2");
            }
        }
    }
}