Problem:
 Score : 100 points    Problem Statement You will be given a string S of length 3 representing the weather forecast for three days in the past.  The i -th character (1 \leq i \leq 3) of S represents the forecast for the i -th day. S , C , and R stand for sunny, cloudy, and rainy, respectively.  You will also be given a string T of length 3 representing the actual weather on those three days.  The i -th character (1 \leq i \leq 3) of S represents the actual weather on the i -th day. S , C , and R stand for sunny, cloudy, and rainy, respectively.  Print the number of days for which the forecast was correct.      Constraints  S and T are strings of length 3 each.  S and T consist of S , C , and R .         Input Input is given from Standard Input in the following format:  S  T       Output Print the number of days for which the forecast was correct.        Sample Input 1 CSS
CSR      Sample Output 1 2   For the first day, it was forecast to be cloudy, and it was indeed cloudy.  For the second day, it was forecast to be sunny, and it was indeed sunny.  For the third day, it was forecast to be sunny, but it was rainy.   Thus, the forecast was correct for two days in this case.       Sample Input 2 SSR
SSR      Sample Output 2 3       Sample Input 3 RRR
SSS      Sample Output 3 0

Solution (Python):
s = input()
t = input()

count = 0

for i in range(3):
    if s[i] == t[i]:
        count += 1

print(count)

Solution (Python):
def calc(a, b):
    if a == b:
        return 1
    else:
        return 0


S = input()
S1, S2, S3 = S[0], S[1], S[2]
S = input()
T1, T2, T3 = S[0], S[1], S[2]

print(calc(S1, T1) + calc(S2, T2) + calc(S3, T3))

Solution (Python):
S = input()
T = input()
cnt = 0

for i in range(3):
  if S[i] == T[i]:
    cnt += 1

print(cnt)

Solution (Python):
s = input()
t = input()
cnt = 0

for i in range(3):
    if s[i] == t[i]:
        cnt += 1
print(cnt)

Solution (Python):
S = input()
T = input()

count = 0
i = 0
for num in T:
  if num == S[i]:
    count += 1
  i += 1
  
print(count)

Solution (Python):
s = list(input())
t = list(input())

counter = 0


for i in range(len(s)):
  if s[i] == t[i]:
    counter +=1
print(counter)

Solution (Python):
S = list(str(input()))
T = list(str(input()))

cnt = 0
for i,j in zip(S,T):
  if i == j:
    cnt +=1

print(cnt)

Solution (Python):
S = input()
T = input()

print(sum(s == t for s, t in zip(S, T)))

Solution (Python):
s = input()
t = input()
a = 0
if s[0] == t[0]: a = a + 1
if s[1] == t[1]: a = a + 1
if s[2] == t[2]: a = a + 1
print(a)

Solution (Python):
x = input()
y = input()
count = 0
for i in range(3):
  if x[i]==y[i]:
    count+=1
print(count)

Solution (Python):
s = input()
t = input()
ans = 0

for i in range(len(s)):
    if s[i] == t[i]:
        ans += 1
print(ans)

Solution (Python):
s = str(input())
t = str(input())
ans = 0
for i in range(3):
    if s[i] == t[i]:
        ans += 1
print(ans)

Solution (Python):
yoho = input()
actual = input()
ans = 0
for i in range(3):
  if yoho[i]==actual[i]:
    ans += 1
print(ans)

Solution (Python):
S=input()
T=input()
ans=0
for (s,t) in zip(S,T):
    ans+=int(s==t)
print(ans)

Solution (Python):
s = input()
t = input()
c = 0

for i in range(3):
    if(s[i] == t[i]):
        c += 1

print(c)

Solution (Python):
S = input().strip()
T = input().strip()
print(len([1 for i in range(3) if S[i] == T[i]]))

Solution (Python):
w1 = input()
w2 = input()
count = 0

for x, y in zip(w1, w2):
  if x == y:
    count += 1
    
print(count)

Solution (Python):
s1, s2, s3 = input()
t1, t2, t3 = input()
if s1 == t1:
    if s2 == t2:
        if s3 == t3:
            print(3)
        else:
            print(2)
    else:
        if s3 == t3:
            print(2)
        else:
            print(1)
else:
    if s2 == t2:
        if s3 == t3:
            print(2)
        else:
            print(1)
    else:
        if s3 == t3:
            print(1)
        else:
            print(0)

Solution (Python):
s=input()
t=input()
slist=list(s)
tlist=list(t)
cnt=0
if s[0]==t[0]: cnt+=1
if s[1]==t[1]: cnt+=1
if s[2]==t[2]: cnt+=1
print(cnt)

Solution (Python):
s = input()
t = input()
print(sum([i==j for i,j in zip(s,t)]))

Solution (Python):
S = input()
T = input()

count = 0
if S[0]  == T[0]:
    count += 1
if S[1]  == T[1]:
    count += 1
if S[2]  == T[2]:
    count += 1    
print(count)

Solution (Python):
import sys
import math
from fractions import gcd





def lcm(a, b):
    return a * b // gcd(a, b)

def combination_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

def permutations_count(n, r):
    return math.factorial(n) // math.factorial(n - r)

big_prime = 1000000007

"""


 =  sys.stdin.readline().rstrip()
 =  list(sys.stdin.readline().rstrip())


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""

S =  list(sys.stdin.readline().rstrip())
T =  list(sys.stdin.readline().rstrip())

cnt = 0

for i in range(len(S)):
    if(S[i] == T[i]):
        cnt += 1

print(cnt)

Solution (Python):
i = input()
s = input()
print(len([u for u, o in zip(i, s) if u == o]))

Solution (Python):
S=list(input())
T=list(input())
if S[0]==T[0] and S[1]==T[1] and S[2]==T[2]:
  print(3)
elif S[0]==T[0] and S[1]!=T[1] and S[2]!=T[2]:
  print(1)
elif S[0]!=T[0] and S[1]==T[1] and S[2]!=T[2]:
  print(1)
elif S[0]!=T[0] and S[1]!=T[1] and S[2]==T[2]:
  print(1)
elif S[0]!=T[0] and S[1]!=T[1] and S[2]!=T[2]:
  print(0)
else:
  print(2)

Solution (Python):
S = input()
T = input()
cnt = 0
for i, s in enumerate(S):
    if s == T[i]:
        cnt += 1
print(cnt)

Solution (Python):
S = input()
T = input()

count = 0
for i in range(3):
  if S[i] == T[i]:
    count += 1
print(count)

Solution (Python):
S=input()
T=input()
a=0
for i in range(3):
    if S[i]==T[i]: a+=1
print(a)

Solution (Python):
s = input()
t = input()
cnt = 0
for i in range(3):
    if s[i] == t[i]:
        cnt += 1

print(cnt)

Solution (Python):
import sys

s = input()
t = input()
result = 0

for i in range(len(s)):
  if s[i] == t[i]:
    result += 1

print(str(result))

Solution (Python):
S = list(input())
T = list(input())
ans =0

for i, j in zip(S, T):
    if i == j:
        ans += 1

print(ans)

Solution (Python):
s = input()
t = input()

s_list = [a for a in s]
t_list = [b for b in t]

c = 0
for i in range(3):
    if s_list[i] == t_list[i]:
        c = c + 1

print(c)

Solution (Python):

if __name__ == "__main__":

    a = input()
    b = input()
    print(sum([a[i] == b[i] for i in range(3)]))

Solution (Python):
s = input()
t = input()
ans = 0
for i in range(3):
    if s[i] == t[i]:
        ans += 1
print(ans)

Solution (Python):
s = input()
t = input()

print(int(s[0]==t[0])+int(s[1]==t[1])+int(s[2]==t[2]))

Solution (Python):
S = input()
T = input()

cnt = 0
for i in range(3):
    if S[i] == T[i]:
        cnt += 1
print(cnt)

Solution (Python):
s = input()
t = input()

ans = 0

for i in range(len(s)):
    if s[i] == t[i]:
        ans += 1
print(ans)

Solution (Python):
s = input()
t = input()

ans = 0
for i in range(3):
  if s[i] == t[i]:
    ans += 1
    
print(ans)

Solution (Python):
S = input()
T = input()
def check(s, t):
    if s == t:
        return 1
    else:
        return 0
cnt = 0
for i in range(3):
    cnt = cnt + check(S[i], T[i])
print(cnt)

Solution (Python):
s, t = input(), input()
c = 0
for i in range(3):
    if s[i] == t[i]:
        c += 1
print(c)

Solution (Python):
S = input()
T = input()

cnt = 0
for i in range(len(S)):
    if S[i] == T[i]:
        cnt += 1
print(cnt)

Solution (Python):
def solve():
    s,t= input(),input()
    print(sum(1 for x,y in zip(s,t) if x== y))
solve()

Solution (Python):
s = input()
r = input()
s = str(s)
r = str(r)

count = 0
for xi in range(3):
    if s[xi] == r[xi]:
        count = count +1

print(count)

Solution (Python):
s = input()
t = input()
m = 0
for i in range(3):
  if s[i] == t[i]:
    m+=1
print(m)

Solution (Python):
s = input()
t = input()
ans = 0
for i in range(3):
  if s[i]==t[i]:
    ans += 1
print(ans)

Solution (Python):
S = input()
T = input()
ans = 0
for s, t in zip(S, T):
    if s==t:
        ans += 1
print(ans)

Solution (Python):
S = input()
S.split()
T = input()
T.split()
count = 0
for i in range(0, 3):
    if S[i] == T[i]:
        count += 1
print(count)

Solution (Python):
S = input()
T = input()
S1 = list(S)
T1 = list(T)
N=0
for x in range(0,3):
    if S1[x]==T1[x]:
        N=N+1
print(N)

Solution (Python):

A = str(input())
B = str(input())
ans = 0

for i in range(3):
    if A[i] == B[i]:
        ans += 1

print(ans)

Solution (Python):
S = list(input())
T = list(input())
res = 0
for i in range(3):
  if S[i] == T[i]:
    res += 1
print(res)

Solution (Python):
anticipations = input()
result =  input()

hit_count = 0
for i in range(len(anticipations)):
  if anticipations[i] == result[i]:
    hit_count += 1
print(hit_count)

Solution (Python):
S = input()
T = input()
ans = 0
for s, t in zip(S, T):
    ans += s == t
print(ans)

Solution (Python):
S = input()
T = input()

correct_count = 0

for i in range(3):
  if S[i] == T[i]:
    correct_count = correct_count + 1
    
print(correct_count)

Solution (Python):

S = input()
T = input()
c = 0
for i in range(3):
  if S[i] == T[i]:
    c +=1
print(c)

Solution (Python):

str1 = input()
str2 = input()

count = 0

for i in range(len(str1)):
    if (str1[i] == str2[i]):
        count += 1

print(count)

Solution (Python):
S=input()
T=input()
if len(S)>3 or len(S) < 1 or len(T)>3 or len(T) < 1:
  sys.exit()

a = 0
if S[0] == T[0]:
  a += 1
if S[1] == T[1]:
  a += 1
if S[2] == T[2]:
  a += 1

print(a)

Solution (Python):
s=input()
t = input()
ans=0
for i in range(3):
    if s[i] == t[i]:
        ans += 1
print(ans)

Solution (Python):
S = input()
T = input()
cnt = 0
for i in range(len(S)):
    if S[i] == T[i]:cnt+=1
print(cnt)

Solution (Python):

import sys


def solve(S: str, T: str):
    print(([S[0]==T[0], S[1]==T[1], S[2] == T[2]]).count(True))
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    T = next(tokens)  
    solve(S, T)

if __name__ == '__main__':
    main()

Solution (Python):
S = [str(i) for i in input()]
T = [str(i) for i in input()]

sum=0
for i in range(len(S)):
    if S[i]==T[i]:
        sum += 1

print(sum)

Solution (Python):
S = input()
T = input()

ans = 0
for index in range(3):
    if S[index:index+1] == T[index:index+1]:
        ans += 1

print(ans)

Solution (Python):
import collections as c
ip = lambda : map(int, input().split())

mod = 1e9+7
S = input()
T = input()
ans = 0
for i,j in zip(S,T):
    if i==j:
        ans+=1
print(ans)

Solution (Python):
S = str(input())
T = str(input())

count_num = 0
for i in range(0,3):
  if S[i] == T[i]:
    count_num = count_num + 1
    
print(count_num)

Solution (Python):
s=input()
t=input()
count=0
if s[0]==t[0]:
    count+=1
if s[1]==t[1]:
    count+=1
if s[2]==t[2]:
    count+=1
print(count)

Solution (Python):
S = input()
T = input()

ans = 0
for i in range(3):
    if S[i] == T[i]:
        ans += 1

print(ans)

Solution (Python):
S = input().split()
T = input().split()
S = list(S[0])
T = list(T[0])

count = 0
for i in range(3):

    if S[i] == T[i]:
        count += 1


print(count)

Solution (Python):
S = str(input())
T = str(input())

ans = 0
for s, t in zip(S, T):
    if s == t:
        ans += 1
print(ans)

Solution (Python):
S= input()
T= input()


count= 0
for i in range(len(S)):
  if S[i] == T[i]:
    count+=1

print(count)

Solution (Python):
ss = input()
tt = input()
print(sum([ss[i] == tt[i] for i in range(3)]))

Solution (Python):
S = input()
T = input()

cnt = 0
for s, t in zip(S, T):
    if s == t:
        cnt += 1

print(cnt)

Solution (Python):
a = list(input(""))
b = list(input(""))

len(a)

k = 0
for i in range(len(a)):
    if(a[i]==b[i]):
        k += 1

print(k)

Solution (Python):
s = input()
t = input()
ans = 0
if s[0] == t[0]:
  ans += 1
if s[1] == t[1]:
  ans += 1
if s[2] == t[2]:
  ans += 1

print(ans)

Solution (Python):
from sys import stdin


def main():
    S = stdin.readline()
    T = stdin.readline()

    sum_ = 0

    if S[0] == T[0]:
        sum_ += 1

    if S[1] == T[1]:
        sum_ += 1

    if S[2] == T[2]:
        sum_ += 1

    print(sum_)


if __name__ == "__main__":
    main()

Solution (Python):
S, T = open(0).read().split()

result = 0
for i in range(3):
    if S[i] == T[i]:
        result += 1
print(result)

Solution (Python):
N=input()
M=input()
S = []
T = []
flag = 0
S = list(N)
T = list(M)
for i in range(3):
    if S[i] == T[i]:
        flag += 1
print(flag)

Solution (Python):
a = input()
b = input()
r = 0
for i in range(len(a)):
    if a[i] == b[i]:
        r += 1
print(r)

Solution (Python):
S =input()
T =input()

cnt = 0
for idx, s in enumerate(S):
  if s==T[idx]:
    cnt += 1
      
print(cnt)

Solution (Python):
s1 = input()
s2 = input()
ans = 0
for i in range(3):
    if s1[i] == s2[i]:
        ans += 1
print(ans)

Solution (Python):
s = input()
t = input()
o = 0

for i in range(3) :
    v = i

    if s[v]==t[v]:
        o+=1
    
   
print(o)

Solution (Python):
s = input()
t = input()

ans=0
for i in range(3):
    if (s[i:i+1] == t[i:i+1]):
        ans +=1
        
print(ans)

Solution (Python):
S = input()
T = input()
i = 0
if S[0] == T[0]:
  i += 1
if S[1] == T[1]:
  i += 1
if S[2] == T[2]:
  i += 1

print(i)

Solution (Python):
s = str(input())
t = str(input())
cnt = 0
for i in range(0,3):
  if s[i]==t[i]:
    cnt += 1
print(cnt)

Solution (Python):
S=input()
T=input()
n=len(S)
ans=0
for i in range(n):
    if S[i]==T[i]:
        ans+=1
print(ans)

Solution (Python):
S=list(input())
T=list(input())

k=0
for i in (range(3)):
  if S[i]==T[i]:
    k=k+1

print(k)

Solution (Python):
S = input()
T = input()
A = 0
for i in range(3):
  if S[i] == T[i]:
    A += 1
print(A)

Solution (Python):
S = input()
T = input() 
p = 0
for x in range(3):
  if S[x] == T[x]:
    p+=1
print(p)

Solution (Python):
S = list(input())
T = list(input())
c = 0
for x in range(len(S)):
  if S[x] == T[x]:
    c += 1
print(c)

Solution (Python):
S = input()
T = input()

counter = 0

for i in range(3):
  if S[i] == T[i]:
    counter += 1
    
print(counter)

Solution (Python):
def A():
    a = input()
    b = input()
    ans = 0
    for i in range(3):
        if a[i] == b[i]:
            ans += 1
    print(ans)

A()

Solution (Python):
S = input()
T = input()
ctr = 0

for i in range(len(S)):
    if S[i] == T[i]:
        ctr = ctr+1

print(ctr)

Solution (Python):
s, t = input(), input()
print(len([1 for i in range(3) if s[i] == t[i]]))

Solution (Python):
S = input()
T = input()

Count = 0
for i in range(3):
    if S[i] == T[i]:
        Count = Count + 1

print(Count)

Solution (Python):
A, B = input(), input()
print(sum(A[i] == B[i] for i in range(len(A))))

Solution (Python):
N1 = input()
N2 = input()
count = 0
for i in range(len(N1)):
    if N1[i] == N2[i]:
        count += 1
print(count)

Solution (Python):
input = raw_input

p = list(input())
a = list(input())
ans = 0
for i in range(len(p)):
    if p[i] == a[i]:
        ans += 1
print(ans)

Solution (Python):
s = str(input())
t = str(input())
count = 0
if len(s) == len(t) == 3:
    s.upper()
    t.upper()
    slist = list(s)
    tlist = list(t)
    for i in range(len(s)):
        if slist[i] == tlist[i]:
            count += 1
        else:
            continue
    print(count)
else:
    print('hoge!')

Solution (Python):
c=0
S=input()
T=input()

for i in range(3):
    if S[i] == T[i]:
        c+=1

print(c)

Solution (Python):


S = raw_input()
T = raw_input()

count = 0
for i in range(3):
    if S[i] == T[i]:
        count += 1

print(count)

Solution (Python):
s=list(input())
t=list(input())
res=0
for i, j in zip(s, t):
  if i == j:
    res += 1
print(res)

Solution (Python):
s = input()
t = input()

ans = 0
for i in range(3): 
    ans += (s[i] == t[i])
    
print(ans)

Solution (Python):
S = input()
T = input()
count = 0

for i in range(len(S)):
    if S[i] == T[i]:
        count += 1;
        
print(count)

Solution (Python):
S = input()
T = input()

cnt = 0
for s, t in zip(S, T):
    if s == t:
        cnt += 1

print(cnt)

Solution (Python):
S = input()
T = input()
ans = 0
for s,t in zip(S, T):
  if s == t:
    ans += 1
print(ans)

Solution (Python):
def solve():
  import sys
  import math

  sys.setrecursionlimit(10**7)

  a = input()
  b = input()
  
  print(sum(a[i]==b[i] for i in range(3)))


if __name__ == '__main__':
  solve()

Solution (Python):
s = list(input())
t = list(input())
ans = 0
for i in range(3):
	if(s[i]==t[i]):
		ans += 1
print(ans)

Solution (Python):
s = input()
t = input()
print(int(s[0]==t[0])+int(s[1]==t[1])+int(s[2]==t[2]))

Solution (Python):
y = input()
t = input()

n = 0
for i in range(3):
    if(y[i] == t[i]):
        n += 1
print(n)

Solution (Python):
S = input()
T = input()
count = 0
for i in range (0, 3):
  if S[i]  == T[i]:
    count = count + 1
print(count)

Solution (Python):
s=input()
t=input()
c = 0
for i in range(len(s)):
  if s[i]==t[i]:
    c += 1
print(c)

Solution (Python):
import sys

S = str(sys.stdin.readline())
T = str(sys.stdin.readline())


num_correct = sum(1 if S[i] == T[i] else 0 for i in range(len(S[:-1])))

print(num_correct)

Solution (Python):
s=str(input())
t=str(input())
s=[i for i in s]
t=[i for i in t]
c=0
for i in range(3):
  if s[i]==t[i]:
    c=c+1
print(c)

Solution (Python):
a = input()
b = input()

t = 0
for i in range(3):
  if b[i] == a[i]:
    t += 1
    
print(t)

Solution (Python):
s = input()
t = input()
cnt = 0

for c in range(3) :
    if(s[c] == t[c]) :
        cnt += 1

print(cnt)

Solution (Python):
S = input()
T = input()

count = 0
for i in range(3):
  if S[i] == T[i]:
    count += 1
    
print(count)

Solution (Python):
S = list(input())
T = list(input())

count = 0

for i in range(3):
    if(S[i] == T[i]):count = count + 1

print(count)

Solution (Python):




s = input()
t = input()


cnt = 0
for i in range(3):
    if s[i] == t[i]:
        cnt = cnt + 1
ans = cnt


print(ans)

Solution (Python):
import sys
input = sys.stdin.readline
from operator import itemgetter

def main():
	v = input().strip()
	v2 = input().strip()
	ans = 0
	for i in range(3):
		if v[i] == v2[i]:
			ans += 1
	print(ans)

if __name__ == '__main__':
	main()

Solution (Python):
s = input()
t = input()
ans = 0
for  i in range(3):
  if s[i] == t[i]:
    ans += 1
    
print(ans)

Solution (Python):
s = list(input())
t = list(input())
d = 0
for i in range(3):
  if s[i] == t[i]:
    d += 1

print(d)

Solution (Python):
S = list(input())
T = list(input())
A = 0
for i,j in zip(S,T):
    if i == j:
        A+=1
    else:
        pass
print(A)

Solution (Python):
s = input()
s_list = list(s)

t = input()
t_list = list(t)
result = 0
for i in range(0,3):
  if s_list[i] == t_list[i]:
    result += 1
print(result)

Solution (Python):
s = list(input())
t = list(input())

count = 0

for i in range(3):
    if s[i] == t[i]:
        count = count + 1

print(count)

Solution (Python):
forecast = input()
weather = input()

S = [forecast[i:i+1] for i in range(3)]
T = [weather[i:i+1] for i in range(3)]
count = 0

for i in range(3):
  if forecast[i] == weather[i]:
    count += 1
    
print(count)

Solution (Python):
S = list(input())
T = list(input())
c = 0
for i, k in zip(S, T):
  if i == k:
    c += 1
print(c)

Solution (Python):
pred = list(input())
res = list(input())

cnt = 0
for i,j in zip(pred,res):
    if i==j:
        cnt +=1

print(cnt)

Solution (Python):
s=input()
t=input()
ans=0
for i in range(3):
  if s[i]==t[i]:ans+=1
print(ans)

Solution (Python):
S = input().split()[0]
T = input().split()[0]
cnt = 0 
for i in range(3):
    if S[i] == T[i]:
        cnt += 1

print(cnt)

Solution (Python):
s = input()
t = input()
cnt = 0
if s[0] == t[0]:
    cnt += 1
if s[1] == t[1]:
    cnt += 1
if s[2] == t[2]:
    cnt += 1
print(cnt)

Solution (Python):
S=input()
T=input()
ans=0
for i in range(3):
  if S[i]==T[i]:
    ans += 1
print(ans)

Solution (Python):
s = input()
t = input()
cnt = 0
for i in range(3):
    if s[i] == t[i]:
        cnt += 1
print(cnt)

Solution (Python):
s = list(input())
t = list(input())

ans = 0
for i in range(3):
    if s[i] == t[i]:
        ans += 1

print(ans)

Solution (Python):
s = list(input())
t = list(input())

cnt = 0
for i in range(3):
    if s[i] == t[i]:
        cnt = cnt + 1
print(cnt)

Solution (Python):
s = list(input())
t = list(input())
p = []

for i in range(0,3):
    p.append(s[i] == t[i])
    
print(p.count(True))

Solution (Python):
def main():
    S = input()
    T = input()
    forecast_ok = [s == t for s, t in zip(S, T)]
    print(sum(forecast_ok))


if __name__ == "__main__":
    main()

Solution (Python):
s = str(input())
t = str(input())

s = list(s)
t = list(t)

ans = 0
count = 0

for x in s:
  if s[count] == t[count]:
    ans += 1
  count += 1
    
print(ans)

Solution (Python):
a = str(input())
b = str(input())

count = 0

for i,j in zip(a,b):
  if i==j:
    count+=1
    
print(count)

Solution (Python):
S = input()
T = input()

ans = 0
for i in range(3):
    if S[i] == T[i]:
        ans += 1
print(ans)

Solution (Python):
s = input()
t = input()
count = 0
for i in range(3):
  if s[i]==t[i]:
    count += 1
print(count)

Solution (Python):
s = input()
s2 = input()
cnt = 0
for st, st2 in zip(s, s2):
  if st == st2:
    cnt += 1
  
print(cnt)

Solution (Python):
S = input()
T = input()

cnt = 0
for i in range(3):
    if S[i] == T[i]:
        cnt += 1
        
print(cnt)

Solution (Python):
S=input()
T=input()
a=0
for i in range(3):
    if S[i]==T[i]:
        a=a+1
    else:
        a=a+0
print(a)

Solution (Python):
s = input()
t = input()

cnt = 0
for si, ti in zip(s, t):
    if si == ti:
        cnt += 1
print(cnt)

Solution (Python):
string_list=[input() for i in range(2)]
s, t = string_list[0], string_list[1]
count = 0
for i in range(3):
    if s[i] == t[i]:
        count = count + 1
print(count)

Solution (Python):
s = input()
t = input()

count = 0
for i in range(len(s)):
	if s[i] == t[i]:
		count += 1
print(count)

Solution (Python):
l = list(input())
m = list(input())

ans = 0
for i, j in zip(l, m):
  if i == j:
    ans += 1
print(ans)

Solution (Python):
import sys
inputs = sys.stdin.readlines()

S, T = inputs[0].strip(), inputs[1].strip()
c = 0
for s, t in zip(S, T):
    if s == t:
        c += 1
print(c)

Solution (Python):
s1 = input()
t1 = input()
s = list(s1)
t = list(t1)
c=0
for i in range(3):
  if s[i]==t[i]:
    c+=1
print(c)

Solution (Python):
S=input()
T=input()
ok = 0
for i in range(3):
    if S[i] == T[i]:
        ok+=1
print(ok)

Solution (Python):
S = input()
T = input()

cnt = 0
for s, t in zip(S, T):
    if s == t:
        cnt += 1

print(cnt)

Solution (Python):
s = input()
t = input()
count = 0
for i, j in zip(s, t):
  if i== j:
    count += 1
print(count)

Solution (Python):
S = input()
T = input()
cnt = 0
for i in range(len(S)):
    if S[i]==T[i]:
        cnt += 1
print(cnt)

Solution (Python):
s = input()
t = input()

count = 0
for i in range(len(s)):
    if s[i] == t[i]:
        count += 1


print(count)

Solution (Python):
s = str(input())
t = str(input())
count = 0

for i in range(3):
  ss = s[i]
  tt = t[i]
  if ss == tt:
    count += 1
    
print(count)

Solution (Python):
pred = list(input())
res = list(input())

cnt = 0
for i in range(len(pred)):
  if pred[i] == res[i]:
    cnt += 1
  
print(cnt)

Solution (Python):
S=input()
T=input()
N=0
for i in range(3) :
  if S[i]==T[i] :
    N+=1
print(N)

Solution (Python):
S = input()
T = input()

ans = 0
for x, y in zip(S, T):
    if x == y:
        ans += 1
print(ans)

Solution (Python):
s1 = input()
s2 = input()

r1 = 0
for i1 in range(3):
    if s1[i1] == s2[i1]:
        r1 += 1

print(r1)

Solution (Python):
pred = input()
true = input()
cnt = 0
for i in range(3):
  if pred[i] == true[i]:
    cnt += 1
print(cnt)

Solution (Python):
import numpy as np


def main():
	
	S = input()
	T = input()

	count = 0
	for s, t in zip(S, T):
		if s == t:
			count += 1
	print(count)
	
if __name__ == "__main__":
	main()

Solution (Python):

S=str(input())
T=str(input())

count=0
for i in range(3):
    if S[i]==T[i]:
        count+=1
print(count)

Solution (Python):
yohou = list(str(input()))
kekka = list(str(input()))
count = 0

for i in range(3):
  if yohou[i] == kekka[i]:
    count += 1

print(count)

Solution (Python):
s = input()
t = input()
s = list(s)
t = list(t)
count = 0
for i in range(3):
    if s[i] == t[i]:
        count += 1
print(count)

Solution (Python):
s = input()
t = input()
ans = 0
for i in range(3):
  if s[i]==t[i]:
    ans += 1
  else:
    pass
print(ans)

Solution (Python):
S = input()
T = input()
answer = 0
for i in range(3):
    if S[i] == T[i]:
        answer += 1
print(answer)

Solution (Python):
def solve(S, T):
    count = 0
    for s, t in zip(S, T):
        count += (s == t)
    return count


if __name__ == '__main__':
    S = input()
    T = input()
    answer = solve(S, T)
    print(answer)

Solution (Python):
S = input()
T = input()

n = 0
for s,t in zip(S,T):
  if s == t: n += 1

print(n)

Solution (Python):


"""
oj dl https://atcoder.jp/contests/abc116/tasks/abc116_d -d test-d
oj test -d test-d -c "python abc116d.py"
oj test -d test-d -c "python abc116d.py" test-d/sample-3.in
"""
from collections import defaultdict
import sys
import math
from datetime import datetime

def sol(S, T):
    ans = 0
    for i in range(len(S)):
        
        if S[i] == T[i]:
            ans += 1
    return ans


do_submit = True


def input_parse(input_str):
    lines = [x.strip() for x in input_str.split("\n") if x.strip()]
    parsed_lines = [list(map(str, line.split())) for line in lines]
    print(parsed_lines)
    n = int(parsed_lines[0][0])
    k = int(parsed_lines[0][1])
    S = parsed_lines[1][0]
    return n, k, S


if not do_submit:
    a, b, c = input_parse("""
    3 1
    ABC
    """)
    print(sol(a, b, c))

    a, b, c = input_parse("""
    4 3
    CABA
    """)
    print(sol(a, b, c))

else:
    
    
    S = input()
    T = input()
    print(sol(S, T))

Solution (Python):
S=input()
T=input()

count=0
for s,t in zip(S,T):
    if s==t:
        count+=1
print(count)

Solution (Python):
s=input()
t=input()
count=0
for i in range(len(s)):
  if s[i]==t[i]:
    count+=1
print(count)

Solution (Python):
s = input()
t = input()
c = 0

if s[0] == t[0]:
  c += 1

if s[1] == t[1]:
  c += 1

if s[2] == t[2]:
  c += 1
    
print(c)

Solution (Python):
S=input()
T=input()
N=0
for i in range(3) :
  if S[i]==T[i] :
    N+=1
print(N)

Solution (Python):
S = input()
T = input()
ans = 0

for i in range(3):
    if S[i] == T[i]:
        ans += 1

print(ans)

Solution (Python):
pre = input()
real = input()
ans = 0
for i in range(3):
  if pre[i] == real[i]:
    ans += 1
print(ans)

Solution (Python):
S_list = input()
T_list = input()
count = 0

for i in range(0, 3):
  if S_list[i] == T_list[i]:
    count += 1
  else:
    pass
  
print(count)

Solution (Python):
import numpy as np
S=input()
T=input()
count=0
for i in range(3):
    if T[i]==S[i]:
        count+=1
print(count)

Solution (Python):
expect = list(input())
result = list(input())
answer = 0
for i in range(len(expect)):
  if expect[i] == result[i]:
    answer += 1

print(answer)

Solution (Python):
s = input()
t = input()
ans = 0
for i in range(3):
  if s[i] == t[i]: ans += 1

print(ans)

Solution (Python):
S = str(input())
T = str(input())

count = 0
s_seq = [i for i in S]
t_seq = [i for i in T]

for k in range(3):
    if s_seq[k] == t_seq[k]:
        count += 1

print(count)

Solution (Python):
s = input()
t = input()
count = 0

for i in range(3):
    if s[i] == t[i]:
        count += 1
print(count)

Solution (Python):
s = input()
t = input()
ans = 0
for i in range(3):
    if s[i] == t[i] :
        ans = ans + 1

print(ans)

Solution (Python):
A=input()
B=input()
ans=0
for i in range(3):
    if A[i]==B[i]:
        ans+=1
        
print(ans)

Solution (Python):

a = raw_input()
b = raw_input()

count = 0

for i in xrange(3):
  if a[i] == b[i]:
  	count += 1
print count

Solution (Python):
def main():
    s = list(input())
    t = list(input())
    cnt = 0
    for s_,t_ in zip(s,t):
        if s_==t_:
            cnt +=1
    
    print(cnt)

if __name__ =="__main__":
    main()

Solution (Python):
a, b = input().rstrip(), input().rstrip()
print(len(list(filter(lambda z: z[0] == z[1], zip(a, b)))))

Solution (Python):
S = input()
List = [input() for i in range(1)]
T = List[0]

Slst = list(S)
Tlst = list(T)
M = 0

for x in range(3):
    if Slst[x] == Tlst[x]:
        M += 1
print(M)

Solution (Python):
S=input()
T=input()
correct = 0
for i in range(3):
    if(S[i] == T[i]):
        correct = correct + 1
print(correct)

Solution (Python):
s = list(input())
t = list(input())
count = 0
for i in range(3):
  if s[i] == t[i]:
    count += 1
  else :
    continue
    
print(count)

Solution (Python):
s=input()
t=input()
c=0
for i in range(3):
  if s[i]==t[i]:
    c+=1
print(c)

Solution (Python):
s = input()
t = input()
count = 0
for i in range(3):
	if s[i] == t[i]:
		count += 1

print(count)

Solution (Python):
s = input()
t = input()
print(len([v for i,v in enumerate(s) if (t[i] == v)]))

Solution (Python):
S = input()
T = input()
result = 0
for i in  range(3):
    if S[i] == T[i]:
        result += 1
print(result)

Solution (Python):
a=input()
b=input()
c=0
for x in range(3):
  if(a[x]==b[x]):
    c=c+1
print(c)

Solution (Python):
s = list(input())
t = list(input())
hit_count = 0

for i in range(3):
    if s[i] == t[i]:
        hit_count += 1

print(hit_count)

Solution (Python):




S = str(input())
T = str(input())

ans = 0
for i in range(3):
  ans += (S[i]==T[i])
print(ans)

Solution (Python):
S = input()
T = input()
p_count = 0
for i in range(3):
  if S[i] == T[i]:
    p_count += 1
print(p_count)

Solution (Python):
s=input()
t=input()
res=0
for i in range(len(s)):
	if s[i]==t[i]:
		res+=1
print(res)

Solution (Python):
s = input()
t = input()

count = 0
for i in range(3):
    if s[i] == t[i]:
        count += 1
print(count)

Solution (Python):
def resolve():
    s = input()
    t = input()
    ans = 0
    for si, ti in zip(s, t):
        if si == ti:
            ans += 1
    print(ans)


if __name__ == "__main__":
    resolve()

Solution (Python):
ans = 0

s = input()

ss = input()

for x, y in zip(s, ss):
  if x == y:
    ans += 1

print(ans)

Solution (Python):

S = str(input())
T = str(input())

counter = 0
for i in range(len(S)):
    if S[i] == T[i]:
        counter += 1

print(counter)

Solution (Python):
s = list(input())
t = list(input())

cnt = 0
for i in range(len(s)):
    if s[i] == t[i]:
        cnt += 1

print(cnt)

Solution (Python):
S = input()
T = input()

count = 0
for i in range(3):
    if S[i] == T[i]:
        count += 1

print(count)

Solution (Python):
line=list(input())
line2=list(input())

a=0
for i in range(3):
	if line[i]==line2[i]:
		a+=1
print(a)

Solution (Python):
s = input()
t = input()
count = 0
for i in range(3):
  if s[i] == t[i]:
    count += 1
print(count)

Solution (Python):
S = list(input())
T = list(input())
ans = 0
for i in range(len(S)):
    if S[i]==T[i]:
        ans += 1
print(ans)

Solution (Python):
S = input()
T = input()
ans = 0
for i in range(len(S)):
    if S[i] == T[i]:
        ans += 1
print(ans)

Solution (Python):
S = input()
T = input()

good_count = 0
for i in  range(len(S)):
  if S[i] == T[i]:
    good_count += 1
print(good_count)

Solution (Python):
S = input()
T = input()

count = 0
for (s,t) in zip(S,T):
	if s == t:
		count += 1
		
print(count)

Solution (Python):
s1=input()
s2=input()
c=0
for i,j in zip(range(3),range(3)):
    if s1[i]==s2[j]:
      c+=1
print(c)