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