#include <iostream>

int main()
{
    unsigned long long k;
    std::cin >> k;

    std::cout << (k * 3) << std::endl;
    unsigned long long curr = 0;
    for (unsigned long long i = 0; i < k; i++)
    {
        for (unsigned long long j : { curr, curr + 1, curr + 2 })
        {
            std::cout << i << " " << j << std::endl;
        }

        curr += 4;
    }

    return 0;
}