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