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