c1,c2,c3 = input().split() if c2 == '?': print(14) elif c2 == '2': print(4) else: print(1)