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


long long perm(long long x) {
    return (x*(x-1)*(x-2))/6;
}

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

    long long K, n = 0,m = 0,n1 = -1, m1 = -2, N = 0, temp = 0;
    vector<long long> vec;

    K = 12;

    while(K > 3) {
        temp = 0;
        while(perm(temp + 1) <= K) {
            temp++;
        }
        vec.push_back(temp);

        K -= perm(temp);
    }

    //vec.push_back(K);

    for(auto i : vec) {
        N += i;
    }

    cout << N + K*3 << endl;

    for(auto i : vec) {
        for(long long int k = 0; k < i; ++k) {
            cout << n << " " << m << "\n";
            n++;
            m++;
        }
        m++;
    }

    for(long long int k = 0; k < K; ++k) {
        cout << n << " " << m << "\n";;
        cout << n + 1 << " " << m + 1 << "\n";
        cout << n + 2 << " " << m + 2 << "\n";
        n+=3;
        m+=4;
    }

    return 0;
}