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