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