dig, num = raw_input(), raw_input()
cont = 0
for ele in num:
    if dig == ele:
        cont += 1
print(cont)

548ad63dc5515f50fcc7de7e6f0c4873fdeeceff
<mask token>

<mask token>
for ele in num:
    if dig == ele:
        cont += 1
print(cont)

dig, num = raw_input(), raw_input()
cont = 0
for ele in num:
    if dig == ele:
        cont += 1
print(cont)
