1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
#include <algorithm>
#include <cstdio>
#include <vector>
#include <set>

using namespace std;

int main()
{
	long n;
	scanf("%ld", &n);
	printf("%ld\n", 64);
	for (long i = 3; i <= 63; i += 2)
	{
		printf("%ld %ld\n", i, i - 1);
		printf("%ld %ld\n", i, n & 1 == 1 ? 64 : -1);

		n /= 2;
	}
	printf("%ld %ld\n", -1, -1);
	printf("%ld %ld\n", -1, -1);
	return 0;
}