import math import sys class Item: def __init__(self, value=0, coefs=None): self.value = value self.coefs = coefs if coefs is not None else [] D = int(input()) if D == 0: print("! 0", flush=True) sys.exit(0) F = [] for n in range(1, 11): print(f"? {n}", flush=True) value = int(input()) coefs = [] coef = 1 for i in range(D + 1): coefs.append(coef) coef *= n F.append(Item(value, coefs)) for i in range(D, 1, -1): nxt = [] for j in range(len(F)): for k in range(j + 1, len(F)): L = math.lcm(F[j].coefs[i], F[k].coefs[i]) a = L // F[j].coefs[i] b = L // F[k].coefs[i] value = a * F[j].value - b * F[k].value coefs = [ a * F[j].coefs[n] - b * F[k].coefs[n] for n in range(D + 1) ] nxt.append(Item(value, coefs)) nxt = nxt[:10] F = nxt L = math.lcm(F[0].coefs[0], F[1].coefs[0]) a = L // F[0].coefs[0] b = L // F[1].coefs[0] val = a * F[0].value - b * F[1].value coef = a * F[0].coefs[1] - b * F[1].coefs[1] assert coef != 0 val //= coef print(f"! {val}", flush=True)