using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ConsoleApp7
{
    class Program
    {
        public static Double fact(Double number)
        {
            Double result = 1;
            while (number != 1)
            {
                result = result * number;
                number = number - 1;
            }
            return result;
        }

        static void Main(string[] args)
        {
            Double K = Convert.ToDouble(Console.ReadLine());
            List<Double> linears = new List<Double>();
            int i = 4, j = 0, q = 4, r = 4, c = 0;
            List<List<Double>> list = new List<List<Double>>();
            Double num = 0;

            while (fact(i + 1) / (fact(3) * fact(i - 2)) < K && (fact(3) * fact(i - 2)) > 0 && fact(i + 1) > 0)
            {
                ++i;
            }

            while (fact(r + 1) / (fact(3) * fact(r - 2)) + fact(i) / (fact(3) * fact(i - 3)) < K && (fact(3) * fact(r - 2)) > 0 && fact(r + 1) > 0)
            {
                ++r;
            }

            Double temp = fact(r) / (fact(3) * fact(r - 3)) + fact(i) / (fact(3) * fact(i - 3));

            if (temp > K)
            {
                i = r = 0;
                while (j < K)
                {
                    list.Add(new List<Double>());
                    list[j].Add(100 + j * j);
                    list[j].Add(105 + (j + 1) * (j + 1));
                    ++j;
                }
                Console.WriteLine(list.Count);
                for (int k = 0; k < list.Count; k++)
                {
                    Console.WriteLine(list[k][0].ToString() + list[k][1]);
                }
            }
            else
            {

                for (int k = 7; k < i + 7; k++)
                {
                    list.Add(new List<Double>());
                    list[list.Count - 1].Add(-k);
                    list[list.Count - 1].Add(k);
                }
                for (int k = 0; k < r; k++)
                {
                    list.Add(new List<Double>());
                    list[k + i].Add(k);
                    list[k + i].Add(-(26 + k));
                }
                

                if (temp < K)
                {

                    j = 2;
                    while (j - 2 + temp < K)
                    {
                        list.Add(new List<Double>());
                        list[list.Count - 1].Add(101 + j * j * 2);
                        list[list.Count - 1].Add(105 + (j + 1) * (j + 1));
                        list.Add(new List<Double>());
                        list[list.Count - 1].Add(103 + j * j * 2);
                        list[list.Count - 1].Add(106 + (j + 1) * (j + 1));
                        list.Add(new List<Double>());
                        list[list.Count - 1].Add(105 + j * j * 2);
                        list[list.Count - 1].Add(107 + (j + 1) * (j + 1));
                        ++j;
                    }
                }
                
                    Console.WriteLine(list.Count);
                    for (int k = 0; k < list.Count; k++)
                    {
                        Console.WriteLine(list[k][0].ToString() + " " + list[k][1]);
                    }
                
                
                
            }

        }
    }
}