#include <bits/stdc++.h>

#define endl "\n"
#define pb push_back
#define ll long long

using namespace std;

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

    int k; cin >> k;

    switch(k) {
        case 1:
            cout << "3" << endl;
            cout << "0 0\n1 0\n2 0" << endl;
            break;
        case 2:
            cout << "5" << endl;
            cout << "0 0\n1 0\n2 0\n2 1\n2 2" << endl;
            break;
        case 3:
            cout << "6" << endl;
            cout << "0 0\n1 0\n1 1\n2 0\n2 1\n2 2" << endl;
            break;
        case 4:
            cout << "4" << endl;
            cout << "0 0\n1 0\n2 0\n3 0" << endl;
            break;
        case 5:
            cout << "6" << endl;
            cout << "0 0\n1 0\n2 0\n3 0\n3 1\n3 2" << endl;
            break;
        case 6:
            cout << "8" << endl;
            cout << "0 2\n0 1\n0 0\n1 0\n2 0\n3 0\n3 1\n3 2" << endl;
            break;
        case 7:
            cout << "8" << endl;
            cout << "0 0\n1 0\n2 0\n3 0\n2 1\n2 2\n3 1\n3 2" << endl;
            break;
        case 8:
            cout << "7" << endl;
            cout << "0 0\n0 1\n0 2\n0 3\n1 0\n2 0\n3 0" << endl;
            break;
        case 9:
            cout << "8" << endl;
            cout << "0 0\n1 0\n2 0\n3 0\n0 1\n0 2\n0 -1\n-1 -2" << endl;
            break;
        case 10:
            cout << "5" << endl;
            cout << "0 0\n1 0\n2 0\n3 0\n4 0" << endl;
            break;
        default:
            cout << "6" << endl;
            cout << "0 0\n1 0\n2 0\n3 0\n4 0\n5 0" << endl;
            break;
    }

    return 0;
}