#include <iostream>
using namespace std;

int n;

int main()
{
	cin >> n;

	int c = 15;

	int l=1,r=n;
	while (l <= r) {
		if (c - r >= 15) {
			c -= r;
			r--;
		}
		else {
			c += l;
			l++;
		}
	}

	cout << c;

    return 0;
}