N = int(input()) print(N-1) for i in range(1,N): print(1,i+1)