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