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