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