list = input().split() if list[1] == '?': print(14) elif list[0] == 2: print(4) else: print(1)