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