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