#include <iostream>
#define endl '\n'
using namespace std;
int k;

int main()
{
	cin >> k;
	int n = (k + 4) / 2;
	if (k % 2 == 1) cout << n + 2 << "\n1 0\n2 0\n";
	else cout << n << endl;
	for (int i = 0; i < n; i++) cout << "0 " << i << endl;
}