#include using namespace std; int main(){ int A; cin >> A; int X = A - 7; if (X < 8) cout << -1 << endl; else cout << X << endl; }