a, b, c = input().split() if a == "?": if b == "2": print(4) else: print(1) elif b == "?": print(14) else: if b == "2": print(4) else: print(1)