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