#include <iostream>
#include <vector>

using namespace std;

int main()
{
	int n, broj, m = 0;
	vector<int> tacke;
	cin >> n;
	if (n == 1) {
		broj = 3;
		for (int i = 0; i < 3; i++) {
			tacke.push_back(0);
			tacke.push_back(i);
			m += 2;
		}
	}
	else if (n == 2) {
		broj = 5;
		for (int i = 2; i >= 0; i--) {
			tacke.push_back(0);
			tacke.push_back(i);
			m += 2;
		}
		for (int i = 1; i < 3; i++) {
			tacke.push_back(i);
			tacke.push_back(0);
			m += 2;
		}		
	}
	else if (n == 3) {
		broj = 6;
		for (int i = 2; i >= 0; i--) {
			tacke.push_back(0);
			tacke.push_back(i);
			m += 2;
		}
		for (int i = 1; i < 3; i++) {
			tacke.push_back(i);
			tacke.push_back(0);
			m += 2;
		}
		tacke.push_back(1);
		tacke.push_back(1);
		m += 2;
	}
	else if (n == 4) {
		broj = 4;
		for (int i = 0; i < 4; i++) {
			tacke.push_back(0);
			tacke.push_back(i);
			m += 2;
		}
	}
	else if (n == 5) {
		broj = 6;
		for (int i = 0; i < 4; i++) {
			tacke.push_back(1);
			tacke.push_back(i);
			m += 2;
		}
		for (int i = 2; i >= 0; i -= 2) {
			tacke.push_back(i);
			tacke.push_back(3);
			m += 2;
		}		
	}
	else if (n == 6) {
		broj = 8;
		for (int i = 0; i < 4; i++) {
			tacke.push_back(1);
			tacke.push_back(i);
			m += 2;
		}
		for (int i = 2; i >= 0; i -= 2) {
			for (int j = 2; j < 4; j++) {
				tacke.push_back(i);
				tacke.push_back(j);
				m += 2;
			}
		}
	}
	else if (n == 7) {
		broj = 10;
		for (int i = 0; i < 4; i++) {
			tacke.push_back(1);
			tacke.push_back(i);
			m += 2;
		}
		for (int i = 2; i >= 0; i -= 2) {
			for (int j = 3; j < 6; j++) {
				tacke.push_back(i);
				tacke.push_back(j);
				m += 2;
			}
		}		
	}
	else if (n == 8) {
		broj = 9;
		for (int i = 0; i < 3; i++) {
			for (int j = 0; j < 3; j++) {
				tacke.push_back(i);
				tacke.push_back(j);
				m += 2;
			}
		}
	}
	else if (n == 9) {
		broj = 10;
		for (int i = 0; i < 2; i++) {	
			int j = 0;
			for (; j < 3; j++) {
				tacke.push_back(i);
				tacke.push_back(j);
				m += 2;
			}
		}
		for (int i = 2, j = 2; i <= 0; i--, j++) {
			tacke.push_back(j);
			tacke.push_back(i);
			m += 2;
		}
		tacke.push_back(2);
		tacke.push_back(1);
		m += 2;
	}
	else {
		broj = 5;
		for (int i = 0; i < 5; i++) {
			tacke.push_back(0);
			tacke.push_back(i);
			m += 2;
		}
	}
	
	cout << broj << endl;
	for (int i = 0; i < m; i += 2) {
		cout << tacke[i] << " " << tacke[i + 1] << endl;
	}
		
	return 0;
}