#include <bits/stdc++.h>
using namespace std;
int main() {
    int n;
	cin>> n;
	for (int i=0; i<n; ++i) {
		cout<< (i*2)%n+1 << " " << (i*2+1)%n+1 <<endl; }
	return 0; }
#include<bits/stdc++.h>
using namespace std;
unsigned long long n,k,sum,l;
unsigned long long cf(unsigned long long x,unsigned long long y)
{
	unsigned long long ans=1;
	for(int i=1;i<=y;i++)
	{
		ans*=x;
	}
	return ans;
}
int main()
{
	scanf("%llu",&n);
	k=n;
	int p;
	for(int i=1;;i++)
	{
		if(k==0) break;
		k/=10;
		p++;
	}
	int m=(p-1)/3;
	for(int i=1;i<=m;i++)
	{
		sum+=(n+1-cf(1000,i)); 
	}
	cout<<sum<<endl;  
	return 0;
}