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