using System;

namespace ConsoleApp8
{
    class Program
    {
        static void Main(string[] args)
        {
            int k = int.Parse(Console.ReadLine());
            int i = 0; int j = 0;
            if (k%2==0)
            {
                Console.WriteLine(k*3);
                while (k/2>0)
                {
                    Console.WriteLine(i + " " + j);
                    j++;
                    Console.WriteLine(i + " " + j);
                    j++;
                    Console.WriteLine(i + " " + j);
                    j -= 2; i++;
                    Console.WriteLine(i + " " + j);
                    j++;
                    Console.WriteLine(i + " " + j);
                    j++;
                    Console.WriteLine(i + " " + j);
                    i += 1;
                    j += 3;
                    k-=2;
                }
                
            }
            else
            {
                Console.WriteLine(k*3);
                while (k / 2 > 0)
                {
                    Console.WriteLine(i + " " + j);
                    j++;
                    Console.WriteLine(i + " " + j);
                    j++;
                    Console.WriteLine(i + " " + j);
                    j -= 2; i++;
                    Console.WriteLine(i  + " " + j);
                     j++;
                    Console.WriteLine(i  + " " + j );
                    j++;
                    Console.WriteLine(i  + " " + j );
                    i += 2;
                    j += 3;
                    k-=2;
                }
                Console.WriteLine(i + " " + j);
                j++;
                Console.WriteLine(i + " " + j);
                j++;
                Console.WriteLine(i + " " + j);
                

            }

            

        }

    }
}