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()

l = len(S)
res = 0
for n in range(l):
    if S[n] == T[n]:
        res += 1
print(res)

Solution (Python):
weather = [input().split() for l in range(2)]
weather_af = weather[0]
weather_bf = weather[1]
count=0

if weather_af[0][0] == weather_bf[0][0]:
    count=count+1
if weather_af[0][1] == weather_bf[0][1]:
    count=count+1
if weather_af[0][2] == weather_bf[0][2]:
    count=count+1

print(count)

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

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

print(ans)

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

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

print(c)

Solution (Python):
n = input()
m = input()
answer = 0

for i in range(3):
  if n[i] == m[i]:
    answer +=1
    
print(answer)

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

ST = list(zip(S,T))


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

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

Solution (Python):
a=input()
b=input()
print(sum(i==j for i,j in zip(a,b)))

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

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

Solution (Python):
s = input()
t = input()
nhits = sum(1 for si, ti in zip(s, t) if si == ti)
print(nhits)

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

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

a=0

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

Solution (Python):
def func(S, T):
    n = 0
    for i in range(3):
        if S[i] == T[i]:
            n += 1
    return n

S = input()
T = input()
print(func(S, T))

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=list(input())
T=list(input())
c=0
for u,v in zip(S,T):
    if u==v:
        c+=1
print(c)

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

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):
in1 = input()
in2 = input()
c = 0
if in1[0] == in2[0]: c +=1
if in1[1] == in2[1]: c +=1
if in1[2] == in2[2]: c +=1
print(c)

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

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

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

Solution (Python):
a = input()
b = input()
c = 0
for a, b in zip(list(a), list(b)):
  if a == b:
    c += 1
print(c)

Solution (Python):
S, T = [input() for i in range(2)]

count = 0

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

print(count)

Solution (Python):
A = list(input())
B = list(input())

counter = 0
q = 0
for i in A:
  if i == B[q]:
    counter += 1
  q += 1

print(counter)

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()

cnt = 0
for i in range(len(s)):
    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()
cr=0
for i in range(3):
  if s[i]==t[i]:
    cr+=1
print(cr)

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):
yohou = list(input())
tenki = list(input())

cnt = 0
for i in range(0,3):
    if yohou[i]==tenki[i]:
        cnt = cnt+1
    else:
        pass
print(cnt)

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):
s = input()
t = input()

count = 0
for forecast, actual in zip(s, t):
    if forecast == actual:
        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= str(input())
t= str(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 x in range(len(S)):
	if S[x] == T[x]:
		count += 1
		
print(count)

Solution (Python):
s1,s2,s3 = input()
t1,t2,t3 = input()
correct_number = 0
if s1==t1:
  correct_number+=1
if s2==t2:
  correct_number+=1
if s3==t3:
  correct_number+=1
  
print(correct_number)

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()
T = input()
ans = 0
for i in range(3):
  if S[i] == T[i]:
    ans += 1
print(ans)

Solution (Python):
if __name__ == '__main__':
    
    s = input()
    t = input()
    global ans
    ans = 0
    for day in range(3):
        if s[day] == t[day]:
            ans += 1
    print(ans)

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()
 
count = 0
 
for i in range(3):
		if s[i] == t[i]:
			count += 1  
    
print(count)

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

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

Solution (Python):


import sys,collections,itertools,re,math,fractions,decimal,random,array,bisect,heapq





def solve(f):
    s = f.read_str()
    t = f.read_str()

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

    return ans


class Reader(object):
    def __init__(self, filename=None):
        self.file = open(filename) if filename is not None else None
        self.case = 1

    def __readline(self):
        return self.file.next().strip() if self.file else raw_input()

    def next_case(self):
        self.file.next()
        self.case += 1

    def read_int(self): return int(self.__readline())
    def read_float(self): return float(self.__readline())
    def read_long(self): return long(self.__readline())
    def read_decimal(self): return decimal.Decimal(self.__readline())
    def read_str(self): return self.__readline()

    def read_int_list(self): return map(int, self.__readline().split())
    def read_float_list(self): return map(float, self.__readline().split())
    def read_long_list(self): return map(long, self.__readline().split())
    def read_decimal_list(self): return map(decimal.Decimal, self.__readline().split())
    def read_str_list(self): return self.__readline().split()

if __name__ == '__main__':
    filename = sys.argv[1] if len(sys.argv) > 1 else None
    f = Reader(filename)
    if f.file:
        while True:
            print "Case 
            try:
                f.next_case()
            except StopIteration:
                break
    else:
        print solve(f)

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())

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

print(count)

Solution (Python):
s = str(input())
t = str(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):
s = list(input())
t = list(input())

answer = 0

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

print(answer)

Solution (Python):
S = [c for c in input()]
T = [c for c in input()]
count = 0

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def LS(): return list(map(list, input().split()))
def S(): return list(input().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


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


def B():
    a, b = LI()
    ans = 0
    b -= 1
    while b > 0:
        b -= a - 1
        ans += 1
    print(ans)

    return


def C():
    n = II()
    h = LI()
    i = 0
    ans = 0
    while i < n:
        down = i+1
        while down < n:
            if h[down - 1] >= h[down]:
                down += 1
            else:
                break
        ans = max(ans, down - i - 1)
        i = down
    print(ans)
    return


def D():
    n = II()
    print(n * (n - 1) // 2)
    return


def E():
    return


def F():
    return


if __name__ == '__main__':
    A()

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

Solution (Python):
a,b,c=input()
d,e,f=input()
list=[1 if a==d else 0,1 if b==e else 0,1 if c==f else 0]
print(list.count(1))

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())

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

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 = list(v for v in input())
T = list(v for v in input())
 
count = 0
 
for i in range(3):
  if S[i] == T[i]:
    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()
count = 0
for i in range(len(s)):
    if s[i] == t[i]:
        count += 1
print(count)

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

print(cnt)

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

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

print(counter)

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

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

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

Solution (Python):
s = [i for i in input()]
t = [i for i in input()]

a = 0
for i,j in zip(s,t):
  if i == j:
    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):
predict = list(input())
result = list(input())

count = 0

for i in range(len(predict)):
    if predict[i] == result[i]:
        count += 1

print(count)

Solution (Python):
predict = list(input())
result = list(input())

count = 0

for i in range(len(predict)):
    if predict[i] == result[i]:
        count += 1

print(count)

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

i = 0
match_count = 0

while i < len(S):
  if S[i] == T[i]:
    match_count += 1
  i += 1

print(match_count)

Solution (Python):
predict = list(input())
result = list(input())

count = 0

for i in range(len(predict)):
    if predict[i] == result[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=input()
t=input()
print(int(s[0]==t[0])+int(s[2]==t[2])+int(s[1]==t[1]))

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

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

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

ans = 0

for i, j in zip(S, T):
  if i == j:
    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 = input()
t = input()
ans = 0
for i, j in zip(s,t):
    if i == j:
        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()
ans = 0
for i in range(3):
    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):
a = list(str(input()))
b = list(str(input()))

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

Solution (Python):
S = input()
T = 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()
cnt = 0

for a,b in zip(s,t):
	if a == b:
		cnt  += 1

print(cnt)

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

result = 0
for tmp1, tmp2 in zip(s, t):
    if tmp1 == tmp2:
        result += 1

print(result)

Solution (Python):
s, t = [input() for i in range(2)]

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 i in range(3):
	if s[i] == t[i]:
		ans += 1

print(ans)

Solution (Python):
s,t=input(),input()
n=0
for x,y in zip(s,t):
    if x==y:
        n+=1
print(n)

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

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


if __name__ == '__main__':
  main()

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

for i  in [0,1,2]:
    if S[i]==T[i]:
        count=count+1

    else:
        pass

print(count)

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

i = 0
ans_cnt = 0

while i < len(S):
    if S[i] == T[i]:
        ans_cnt += 1
    i += 1

print(ans_cnt)

Solution (Python):



a = input()
b = input()

count=0
i=0

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

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=list(input())
t=list(input())
ans=0
for i in range(len(s)):
  if s[i]==t[i]:
    ans+=1
    continue
print(ans)

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

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

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

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

Solution (Python):
line1 = str(input())
a,b,c = list(line1)
line2 = str(input())
d,e,f = list(line2)
if a==d:
  if b==e:
    if c==f:
      print("3")
    else:
      print("2")
  else:
    if c==f:
      print("2")
    else:
      print("1")
else:
  if b==e:
    if c==f:
      print("2")
    else:
      print("1")
  else:
    if c==f:
      print("1")
    else:
      print("0")

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 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(len(s)):
    if s[i] == t[i]:
        cnt += 1
        continue
print(cnt)

Solution (Python):
S = list(input())
T = list(input())
count = 0
for i in range(len(S)):
    if S[i] == T[i]:
        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 = str(input())
T = str(input())
ans = 0
for i in range(3):
    if S[i] == T[i]:
        ans += 1
print(ans)

Solution (Python):
S1,S2,S3 = input()
S = [S1,S2,S3]
T1,T2,T3 = input()
T = [T1,T2,T3]

ans_count = 0

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

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

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

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):
pred = input()
real = input()
length = len(pred)
count = 0
for i in range(length):
  if pred[i] == real[i]:
    count += 1
    
print(count)

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

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

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

length = len(s)

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

print(ans)

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

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

print(num)

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()
diff=0
for i in range(len(S)):
    if S[i]==T[i]:
        diff += 1
print(diff)

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

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

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()











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

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


s=input()


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

Solution (Python):
forecast = input()
real = input()
dem=0
for i in range(3):
    if forecast[i] == real[i]:
        dem+=1

print(dem)

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 i in range(3):
  if S[i] == T[i]:
    ans += 1

print(ans)

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

Solution (Python):
ppp = input()
ttt = input()

ans = 0
for p, t in zip(ppp, ttt):
	if p == t:
		ans += 1
print(ans)

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

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

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

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


if __name__ == "__main__":
    main()

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):
    ans += S[i] == T[i]
print(ans)

Solution (Python):
s = input()
t = input()
count = 0
if s[0] == t[0]:
    count = count + 1
if s[1] == t[1]:
    count = count +1
if s[2] == t[2]:
    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):
def main():
    s = input()
    t = input()
    count = 0
    for i in range(3):
        if s[i] == t[i]:
            count += 1
    print(count)


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 = input()
T = input()
ans = 0
for i, j in zip(S, T):
    if i == j:
        ans += 1
print(ans)

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

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

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

success=0
for cnt in range(3):
    if x[cnt]==y[cnt]:
        success+=1
    
print(success)

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):
S = list(input())
T = list(input())
count = 0
for i in range(3):
    if S[i] == T[i]:
        count += 1
print(count)

Solution (Python):
S = input()
T = input()
ret = 0
for x, y in zip(S, T):
    if x == y:
        ret += 1
print(ret)

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

for item_S, item_T in zip(S,T):
  if item_S == item_T:
    count += 1


print(count)

Solution (Python):
yosou=input()
result=input()
cnt=0
for i in range(3):
  if yosou[i] == result[i]:
    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):

import sys


def solve(S: str, T: str):
    count = 0
    for i in range(len(S)):
        if S[i] == T[i]:
            count += 1
        else:
            pass
    print(count)

    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):
prediction = list(input())
wheather = list(input())

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

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()

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

print(ans)

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

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):
def input_lines(n):
    line=[]
    for i in range(n):
        s=input()
        line.append(s)
    return line

l=input_lines(2)
n=0

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

print(n)

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

Solution (Python):
S = input()
T = input()
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 = list(input())
t = list(input())
c = 0
for i in range(len(s)):
  if s[i] == t[i]:
    c += 1
print(c)

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):
forecast =input()
real =input()
i = 0
atari =0
while  i < 3:
    if forecast[i] == real[i]:
        atari = atari+1
    i = i+1
    
print(atari)

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

s1 = s[0]
s2 = s[1]
s3 = s[2]

t1 = t[0]
t2 = t[1]
t3 = t[2]

count = 0
if s1 == t1:
    count = count + 1
if s2 == t2:
    count = count +1
if s3 == t3:
    count = count +1

print(count)

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()
n=0
for i in range(3):
  if(s[i]==t[i]):
    n+=1
print(n)

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

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

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

print(sum([S[i]==T[i] for i in range(3)]))

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

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

Solution (Python):
import sys
sys.setrecursionlimit(100000)

def ii(): return int(input())
def iil(): return list(map(int, input().split()))
def ins(): return input().split()
def lin(): return list(input())

a = lin()
b = lin()
t = map(lambda x,y:x==y,a,b)
print(sum(t))

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):
S=input()
T=input()
x=0
for i in range(3):
    if S[i]==T[i]:
        x += 1
print(x)

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

c = 0
for s, t in zip(S, T):
  c += s == t

print(c)

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

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

Solution (Python):

S = list(input())

L = list(input())
 

S1 = S[0]
S2 = S[1]
S3 = S[2]
L1 = L[0]
L2 = L[1]
L3 = L[2]
 

if S1 == L1 and S2 == L2 and S3 == L3:
  print(3)

elif S1 != L1 and S2 != L2 and S3 != L3:
  print(0)

elif (S1 == L1 and S2 != L2 and S3 != L3) or (S1 != L1 and S2 == L2 and S3 != L3) or (S1 != L1 and S2 != L2 and S3 == L3):
  print(1)

else:
  print(2)

Solution (Python):
s = input()
t = input()
count = 0
for i in range(3):
    if t[i] == s[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 = 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()

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 = list(input())
t = list(input())

count = 0

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

Solution (Python):
s = input()
t = input()
res = 0
for i in range(3):
    res = res + (1 if s[i] == t[i] else 0)
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):
s=input()
t=input()
ans=0
for i in range(3):
    if s[i]==t[i]:
        ans+=1
print(ans)

Solution (Python):
s, t = [input() for _ in range(2)]

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

print(count)

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):
a = input()
b = input()

point = 0

if a[0] == b[0] :
  point = point + 1
  
if a[1] == b[1] :
  point = point + 1
  
if a[2] == b[2] :
  point = point + 1

print(point)

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

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()
cnt = 0
for i in range(3):
  if s[i] == t[i]:
    cnt += 1
print(cnt)

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

hit =0
for i in range(len(s1)):
    if s1[i]==s2[i]:
        hit+=1

print(hit)

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

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

hit =0
for i in range(len(s1)):
    if s1[i]==s2[i]:
        hit+=1

print(hit)

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

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):
s = str(input())
t = str(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())
count = 0

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

print(count)

Solution (Python):
print(sum(i==j for i,j in zip(input(),input())))

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

Solution (Python):
S = input()
T = input()
cnt = 0
for i in range(0, 3):
    if S[i] == T[i]:
        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()
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 i in range(3):
  if s[i] == t[i]:
    ans += 1
print(ans)

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

a = 0

for i in range(0,3):
  if forecast[i] == real[i]:
    a += 1
    
print(a)

Solution (Python):
a = input()
b = input()
c = 0
for i,j in zip(list(a),list(b)):
  if i == j :
    c+=1
print(c)

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

Solution (Python):
i=input()
j=input()
count_num=0
for k in range(3):
  if i[k]==j[k]:
    count_num+=1
print(count_num)

Solution (Python):
s=input()
t=input()
sum=0;

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

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

ans = 0
for i,f in enumerate(forecast):
  if(f == real[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()

c=0

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

print(c)

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

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

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

Solution (Python):
weather_report = input()
actual_weather = input()

res = 0

for i,j in enumerate(weather_report):
    if actual_weather[i] == j:
        res += 1

print(res)