#include <bits/stdc++.h>
const long long N = 5e5 + 5, MOD = 1e9 + 7, INF = LONG_MAX;
using namespace std;
int dx[] = {-1, -1, 0, 1, 1, 1, 0, -1};
int dy[] = {0, 1, 1, 1, 0, -1, -1, -1};
long long n, m, t, a[N];
vector<pair<long long, long long> > ans;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n;
  ans.push_back({0, 1});
  ans.push_back({0, 2});
  for (int j = 1; j <= n; j++) {
    for (int i = j; i < j + 3; ++i) {
      ans.push_back({j, i});
    }
    if (j == n) {
      ans.push_back({j + 1, j + 1});
      ans.push_back({j + 1, j + 2});
    }
  }
  cout << ans.size() << '\n';
  for (auto it : ans) cout << it.first << ' ' << it.second << '\n';
}
