#include using namespace std; int main(void) { int A, X = -1; cin >> A; X = A - 7; if (X < 2) X = -1; cout << X << endl; return 0; }