A = int(input()) if A - 7 < 0: print(-1) else: print(A - 7)