def main(): A = int(input()) if A < 15: print(-1) else: print(A - 7) if __name__ == '__main__': main()