from sys import stdout mon = [i for i in input().split()] qn = mon.index("?") for i in ["1", "4"]: mon[qn] = i mon = list(map(lambda x: int(x), mon)) if (mon[1] == max(mon)) or (mon[1] == min(mon)): stdout.write(i)