#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) { return b == 0 ? a : gcd(b, a % b); }
bool is_vowel(char c) {
  c = tolower(c);
  return c == 'a' || c == 'e' || c == 'o' || c == 'i' || c == 'u' || c == 'y';
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n;
  cin >> n;
  cout << n / 2 + 1 << "\n1 1\n";
  int i = 2, l = 2;
  while (i <= n) {
    cout << l - 1 << ' ' << l << '\n';
    i++;
    if (i <= n) cout << l << ' ' << l << '\n';
    i++;
    l++;
  }
  return 0;
}
