import sys read = sys.stdin.buffer.read readline = sys.stdin.buffer.readline readlines = sys.stdin.buffer.readlines A = int(read()) if A < 15: print(-1) else: print(A-7)