N = int(input()) ans = N - 7 if ans > 7: print(ans) else: print(-1)