a=int(input()) if(a>14): print(a-7) else: print(-1)