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