#include #include #include using namespace std; using ll = long long; using ull = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int main(){ int N; cin >> N; vector> edges; for(int i=1; i<=N; i++){ for(int j=i+1; j<=N; j++){ if(i+j >= N+1) edges.push_back({i,j}); } } cout << edges.size() << "\n"; for(auto e : edges) cout << e.first << " " << e.second << "\n"; return 0; } struct ios_do_not_sync{ ios_do_not_sync(){ ios::sync_with_stdio(false); cin.tie(nullptr); } } ios_do_not_sync_instance;