#include <iostream>
#include <algorithm>
#include <vector>

using namespace std;

int N;

int main()
{
	cin.sync_with_stdio(false);
	
	cin >> N;
	
	if (N % 4 == 0 || N % 4 == 3)
		cout << 15 + 0 << '\n';
	else
		cout << 15 + 1 << '\n';
	
}