let inpt = Int(readLine()!)! var ans = inpt - 7 if(ans < 8) { ans = -1 } print(ans)