#include using namespace std; int main() { int a; cin >> a; cout << (a < 15 ? -1 : a - 7) << endl; return 0; }