def age(x): if x<=14: return -1 else: return x-7 print(age(int(input())))