import sys import math def question(num): print("? %d" % num) sys.stdout.flush() n = int(input()) return n def result(num): print("! %d" % num) sys.stdout.flush() def first_step(i, max_num, min_num): judge = int(max_num / 2) for i in range(i, 28): r = question(judge) if r == 1: # higer min_num = judge elif r == -1: # low max_num = judge else: return 1000, (judge+i) max_num -= 1 min_num -= 1 judge = int((max_num - min_num) / 2) + min_num return i, min_num def second_step(i, judge): for i in range(i, 100 - i): r = question(judge) if r == 0: break return i # main max_num = 1e9 judge = int(max_num / 2) min_num = 10 # less than 100? r = question(100) max_num -= 1 min_num -= 1 if r == -1: r = second_step(1, min_num) elif r == 1: min_num = 100 - 1 i, min_num = first_step(1, max_num, min_num) if i > 100: r = min_num else: r = second_step(i, min_num) else: r = 100 # 答えを出力 result(r)