#include <bits/stdc++.h>
#define endl "\n"
using namespace std;

int main(){
    ios_base::sync_with_stdio(false);
    cin.tie(0);

    long long k;
    cin >> k;

    cout << k << endl;
    long long x = 0, y = 0;
    while (k--){
        for (int i = 0; i < 3; i++){
            cout << x << " " << y << endl;
            x++, y++;
        }
        x++;
    }

    return 0;
}