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