#include using namespace std; int main() { int x; cin >> x; if (x < 17) cout << -1 << endl; else cout << x - 7 << endl; }