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