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