indat = input().split() qindex = indat.index('?') if qindex == 0: if int(indat[1]) < int(indat[2]): print('4') else: print('1') elif qindex == 1: print('14') elif qindex == 2: if int(indat[0]) > int(indat[1]): print('4') else: print('1')