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