#include using namespace std; int main() { int y = 0; cin >> y; int n = y - 7; int ans = (n < 8) ? -1 : n; cout << ans << endl; return 0; }