c = input().split()[1] print(14 if c == '?' else 1 if c == '3' else 4)