#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, i, j, m = -1, x, y, k = 0, l, mn, mx, t, p, flag = 0, sum = 0;
  cin >> n;
  if (n % 2 == 0) {
    k = 2 * n + 3;
    t = (n - 2) / 2;
    t *= 14;
    t += 22;
    cout << t << endl;
    y = 0;
    x = 0;
    for (x = 0; x < k; i++, x++)
      if (x % 4 < 3) cout << x << " " << y << endl;
    x = 0;
    y = 1;
    for (x = 0; x < k; x++)
      if (x % 2 == 0) cout << x << " " << y << endl;
    x = 0;
    y = 2;
    for (x = 0; x < k; x++) cout << x << " " << y << endl;
    x = 2;
    y = 3;
    for (x = 2; x < k - 2; x++)
      if (x % 2 == 0) cout << x << " " << y << endl;
    x = 2;
    y = 4;
    for (x = 2; x < k - 2; x++)
      if (x % 4 != 1) cout << x << " " << y << endl;
  } else {
    k = 2 * n + 3;
    t = (n / 2);
    t *= 14;
    t += 15;
    cout << t << endl;
    y = 0;
    x = 0;
    for (i = 0; i < k - 2; i++, x++)
      if (x % 4 < 3) cout << x << " " << y << endl;
    x = 0;
    y = 1;
    for (i = 0; i < k - 2; i++, x++)
      if (x % 2 == 0) cout << x << " " << y << endl;
    x = 0;
    y = 2;
    for (i = 0; i < k; i++, x++) cout << x << " " << y << endl;
    x = 2;
    y = 3;
    for (x = 2; x < k; x++)
      if (x % 2 == 0) cout << x << " " << y << endl;
    x = 2;
    y = 4;
    for (x = 2; x < k; x++)
      if (x % 4 != 1) cout << x << " " << y << endl;
  }
  return 0;
}
