#include <bits/stdc++.h>
using namespace std;

int main()
{
    long long K;
    long long i;

    cin >> K;

    cout << 3*K << endl;

    for(long long i=0; i<K; i++)
    {
        cout << i << " " << 3*i << endl;
        cout << i << " " << 3*i+1 << endl;
        cout << i << " " << 3*i+2 << endl;
    }

    return 0;
}