#include <cstdio>

#include "testlib.h"

using namespace std;

int main(int argc, char* argv[])
{
    registerGen(argc, argv, 1);
    
    int n = atoi(argv[1]);
    
	printf("%d\n", n);
	for (int i = 2; i <= n; i++)
    {
        int a = i;
        int b = i / 2;
        printf("%d %d\n", a, b);
    }
	return 0;
}
