#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n;
  cin >> n;
  cout << (n / 2) + 1 << endl;
  int x = 1, y = 1;
  for (int i = 1; i <= n; ++i) {
    cout << x << " " << y << endl;
    if (i % 2) {
      ++y;
    } else {
      ++x;
    }
  }
  return 0;
}
