#include<bits/stdc++.h>
#define PRINT(x) cerr<<#x<<'='<<x<<endl;
#define NL(x) " \n"[(x)]
#define lld long long
#define pil pair<int,lld>
#define pli pair<lld,int>
#define pll pair<lld,lld>
#define pii pair<int,int>
#define pb push_back
#define fi first
#define se second
#define mid (l+r)/2
#define endl '\n'
#define all(a) begin(a),end(a)
#define sz(a) int((a).size())
#define LINF 1000000000000000LL
#define INF 1000000000
#define EPS 1e-9
using namespace std;
lld K, cnt;
vector<pll> res;
lld x[12] = {0, -1000, -1000, 1001, 1001, -1001, -1001, 300000000, 300000000, -300000000, -300000000};
pll dodaj() {
    pll rez; rez.fi = x[cnt];
    if(cnt == 1) x[cnt]++, rez.se = -1000000000;
    if(cnt == 2) x[cnt]++, rez.se =  1000000000;
    if(cnt == 3) x[cnt]++, rez.se = -1000000000 + 2*(rez.fi-1000);
    if(cnt == 4) x[cnt]++, rez.se =  1000000000 - 2*(rez.fi-1000);
    if(cnt == 5) x[cnt]--, rez.se =  1000000000 + 2*(rez.fi+1000);
    if(cnt == 6) x[cnt]--, rez.se = -1000000000 - 2*(rez.fi+1000);
    if(cnt == 7) x[cnt]++, rez.se =  -500000000 + 3*(rez.fi-250001000);
    if(cnt == 8) x[cnt]++, rez.se =   500000000 - 3*(rez.fi-250001000);
    if(cnt == 9) x[cnt]--, rez.se =   500000000 + 3*(rez.fi+250001000);
    if(cnt == 10) x[cnt]--, rez.se = -500000000 - 3*(rez.fi+250001000);
    return rez;
}
int main() {
    ios::sync_with_stdio(false);cin.tie(0);cout.tie(0);cerr.tie(0);
    cin >> K;
    while(K) {
        cnt++;
        lld l = 3, r = 2000, rez = 3;
        while(l <= r) {
            if(mid*(mid-1)*(mid-2)/6 <= K) rez = mid, l = mid+1;
            else r = mid-1;
        }
        for(int i = 1; i <= rez; i++) res.pb(dodaj());
        K -= rez*(rez-1)*(rez-2)/6;
    }
    cout << sz(res) << endl;
    for(auto x : res) {
        cout << x.fi << ' ' << x.se << endl;
    }
    return 0;
}