#include using namespace std; int main(){ int A,B; cin >> A; B = A-7; if(B > 7) cout << B << "\n"; else cout << -1 << "\n"; }