#include <bits/stdc++.h>
using namespace std;
int main(int argc, char *argv[]) {
  set<pair<int, int>> usedPoints;
  int n;
  cin >> n;
  int x = 500;
  int y = 500;
  for (int i = 0; i < n; i++) {
    usedPoints.insert(pair<int, int>(x, y));
    usedPoints.insert(pair<int, int>(x - 1, y));
    usedPoints.insert(pair<int, int>(x + 1, y));
    usedPoints.insert(pair<int, int>(x, y - 1));
    usedPoints.insert(pair<int, int>(x, y + 1));
    if (i != n - 1) {
      if (i % 2 == 0) {
        y += 1;
      } else {
        x += 1;
      }
    } else {
      if (i % 2 == 0) {
        x += 1;
      } else {
        y += 1;
      }
    }
  }
  if (n == 1) {
    usedPoints.insert(pair<int, int>(499, 499));
    usedPoints.insert(pair<int, int>(501, 501));
  } else {
    int x1 = 500;
    int y1 = 500 - 1;
    for (int i = 0; i < 5; i++) {
      y1--;
      usedPoints.insert(pair<int, int>(x1, y1));
    }
    int x2 = x;
    int y2 = y;
    if (usedPoints.find(pair<int, int>(x2, y2 - 1)) != usedPoints.end()) {
      for (int i = 0; i < 5; i++) {
        y2++;
        usedPoints.insert(pair<int, int>(x2, y2));
      }
      for (int i = 0; i < 5; i++) {
        x2++;
        usedPoints.insert(pair<int, int>(x2, y2));
      }
    } else {
      for (int i = 0; i < 5; i++) {
        x2++;
        usedPoints.insert(pair<int, int>(x2, y2));
      }
    }
    while (y2 > y1) {
      y2--;
      usedPoints.insert(pair<int, int>(x2, y2));
    }
    while (x2 > x1) {
      x2--;
      usedPoints.insert(pair<int, int>(x2, y2));
    }
  }
  int table[20][20];
  for (int i = 0; i < 20; i++) {
    for (int j = 0; j < 20; j++) {
      table[i][j] = 0;
    }
  }
  int xMin = 10000;
  int yMin = 10000;
  cout << usedPoints.size() << endl;
  for (const pair<int, int> &p : usedPoints) {
    cout << p.first << " " << p.second << endl;
    if (p.first < xMin) {
      xMin = p.first;
    }
    if (p.second < yMin) {
      yMin = p.second;
    }
  }
  for (const pair<int, int> &p : usedPoints) {
    table[p.first - xMin][p.second - yMin] = 1;
  }
  return 0;
}
