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