<filename>AtCoder/ABC139/A.py<gh_stars>1-10
S = input()
T = input()
ans = 0
for i in range(3):
    if S[i] == T[i]:
        ans += 1

print(ans)

<filename>AtCoder/ABC139/A.py<gh_stars>1-10
S = input()
T = input()
ans = 0
for i in range(3):
    if S[i] == T[i]:
        ans += 1

print(ans)
