#include <bits/stdc++.h>
using namespace std;
map<pair<int, int>, bool> gray;
int dx[] = {-1, 0, 1, 0};
int dy[] = {0, -1, 0, 1};
int main() {
  int n;
  cin >> n;
  int cur = 1;
  for (int i = 0; i < n; i++) {
    gray[make_pair(cur, cur)] = 1;
    for (int d = 0; d < 4; d++) {
      int x = cur + dx[d];
      int y = cur + dy[d];
      gray[make_pair(x, y)] = 1;
    }
    cur++;
  }
  gray[make_pair(0, 0)] = 1;
  gray[make_pair(n + 1, n + 1)] = 1;
  cout << gray.size() << endl;
  for (auto kv : gray) {
    pair<int, int> key = kv.first;
    cout << key.first << " " << key.second << endl;
  }
  return 0;
}
