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

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([x == y for x, y in zip(s, t)].count(True))

Solution (Python):
s,d = map(str, open(0).read().split())
ss = list(s)
dd = list(d)
a = 0
for i in range(len(ss)):
  if(ss[i] == dd[i]):
    a += 1
    
print(a)

Solution (Python):
s,t=open(0);print(sum(s[i]==t[i]for i in range(3)))

Solution (Python):
def iread():
    return int(input())


def sread():
    return input()


def aread(t="int"):
    if t == "int":
        ret = [int(i) for i in input().split()]
    elif t == "str":
        ret = list(input())
    return ret


def scan():
    return list(map(int, input().split()))


def main():
    forecast = sread()
    wethar = sread()
    cnt = 0
    for i in range(3) :
        if forecast[i] == wethar[i]:
            cnt += 1
    print(cnt)
    

if __name__ == '__main__':
    main()

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

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

Solution (Python):
print(sum(i==j for i,j in zip(*open(0)))-1)

Solution (Python):
print(sum(i==j for i,j in zip(*open(0)))-1)

Solution (Python):
print(sum(s==t for s, t in zip(input(), input())))

Solution (Python):
forecast = raw_input().strip()
real = raw_input().strip()
assert len(forecast) == len(real)
print sum([1 for i in xrange(len(forecast)) if forecast[i] == real[i]])

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

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

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

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

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

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(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()
ctr = 0

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

print(ctr)

Solution (Python):
S = input()
T = input()
ans = 0
for i,j in zip(S,T):
    ans += i==j

print(ans)

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

Solution (Python):
S = input()
T = input()
print(list(S[i] == T[i] for i in range(3)).count(True))

Solution (Python):
s,t=input(),input()
print(sum(c is d for c,d in zip(s,t)))

Solution (Python):
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations
import sys
import bisect
import string
sys.setrecursionlimit(10**6)
def SI():
    return input().split()
def MI():
    return map(int,input().split())
def I():
    return int(input())
def LI():
    return [int(i) for i in input().split()]
YN=['Yes','No']
mo=10**9+7

s=input()
t=input()
ans=0

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

Solution (Python):
def main():
    s = list(input())
    t = list(input())
    assert len(s) == len(t)
    res = 0
    for i, ss in enumerate(s):
        if ss == t[i]:
            res += 1
    print(res)


if __name__ == "__main__":
    main()

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

ans=0

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

print(ans)

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

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

if __name__ == '__main__':
    main()

Solution (Python):
pred = list(input().strip())
real = list(input().strip())

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

print(ans)

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()
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):
one = []
two = []

a = input()
b = input()

for i in a:
  one.append(i)

for o in b:
  two.append(o)

count = 0

if one[0] == two[0]:
  count += 1
if one[1] == two[1]:
  count += 1
if one[2] == two[2]:
  count += 1
  
print(count)

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

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):
x,y,z=input()
a,b,c=input()
print((x==a) + (y==b) + (z==c))

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(sum([1 if a==b else 0 for a,b in zip(s,t)]))

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

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

    count = 0
    for i, v in enumerate(s):
        if t[i] == v:
            count += 1

    print(count)

        
if __name__ == '__main__':
    main()

Solution (Python):
s = str(input())
t = str(input())
st = tuple(s)
tt = tuple(t)

cnt = 0

for i in range(len(st)):
  if st[i] == tt[i]:
    cnt += 1

print(cnt)

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

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(map(str,input()))
t = list(map(str,input()))
c = 0

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

print(c)

Solution (Python):
S = list(str(input()))
T = list(str(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 s, t in zip(S, T):
  if s == t:
    count += 1
    
print(count)

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

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

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

S = str(input().rstrip())
T = str(input().rstrip())

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

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

print(ans)

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

Correct = 0
Count = 0

for i in S :
    if i == T[Count] :
        Correct += 1
    Count += 1

print(Correct)

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

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

print(counter)

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

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

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

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

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

s = input().strip()
t = input().strip()
print(0 + (s[0] == t[0]) + (s[1] == t[1]) + (s[2] == t[2]))

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

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 ind,s in enumerate(S):
    if(s==T[ind]):
        cnt+=1
print(cnt)

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

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

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

Solution (Python):
import sys

s = sys.stdin.readline()
t = sys.stdin.readline()

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

Solution (Python):
S = input()
T = input()
print(len([1 for s, t in zip(S, T) if s == t]))

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

c = 0

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

print(c)

Solution (Python):
pred = [i for i in input()]
data = [i for i in input()]
cnt = 0

for i in range(3):
  if pred[i] == data[i]:
    cnt += 1

print(cnt)

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

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

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

print(count)

Solution (Python):
import sys
weather_forecast = input()
weather_real = input()
weather_forecast_s = list(weather_forecast)
weather_real_s = list(weather_real)
hit = 0
for i in range(3):
    if weather_forecast_s[i] == weather_real_s[i]:
        hit+=1
print(hit)

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

Solution (Python):
s=str(input())
s=[c for c in s]
t=str(input())
t=[c for c in t]
x=0

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

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

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

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

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

ans = 0

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

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

C = 0

for i in range(3):
    if N[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):
a = input()
b = input()
n = 0
for i in range(3):
  if a[i] == b[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):
s1 = input()
s2 = input()
for i in range(0):
    a[i] = list(map(int, input().split()))
count = 0
for i in range(3):
    if(s1[i]==s2[i]):
        count+=1
print(count)

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

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

Solution (Python):

S = input()
T = input()


p = 0

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


print(p)

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

Solution (Python):

S = input()
T = input()

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

print(x)

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()
S = str(S)
T = str(T)

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

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

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=input()
b=input()
c=0
for i in range(len(a)):
  if a[i]==b[i]:
    c=c+1
print(c)

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

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

count = 0 

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

print(count)

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

yohou_list = list(yohou)

tenki = str(input())

tenki_list = list(tenki)

hi = 0

onaji = 0

while hi < 3 :
    if yohou_list[hi] == tenki_list[hi] :
        onaji+=1
    hi+=1

print(onaji)

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

Solution (Python):
a=list(input())
b=list(input())
cnt=0
for i in range(3):
    if a[i]==b[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):
Q = list(input())
Ans = list(input())
count = 0

for i in range(3):
    if Q[i] == Ans[i]:
        count += 1

print(count)

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

Solution (Python):
weather_report = input()
weather_now = input()
match_result = 0
split_weather_report = []
split_weather_now = []

for i in weather_report:
    split_weather_report += i
for j in weather_now:
    split_weather_now += j

for i in range(3):
    if (split_weather_report[i] in split_weather_now[i]):
        match_result += 1

print(match_result)

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

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

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

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
i=0

while i<=2:
    if S[i]==T[i]:
       count+=1 
    i+=1

print(count)

Solution (Python):
def _input():
    pred = list(input())
    actual = list(input())
    return pred, actual

def evaluation(pred, actual):
    hit = 0
    for p, a in zip(pred, actual):
        if p == a:
            hit += 1
    return hit

if __name__ == "__main__":
    pred, actual = _input()
    print(evaluation(pred, actual))

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

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

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

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

print(count)

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

Solution (Python):
s = input()
t = input()
print(sum(c[0]==c[1] for c in zip(s, t)))

Solution (Python):
from collections import Counter

s = input()
t = input()

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

print(num)

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

Solution (Python):


q = str(input())
a = str(input())

lst_q = list(q)
lst_a = list(a)
len_q = len(lst_q)
ok = 0
for i in range(len_q):
    if lst_q[i] == lst_a[i]:
        ok += 1
print(ok)

Solution (Python):
import numpy as np
hoge = []
for i in range(2):
    a = input()
    hoge.append(a)
a=np.count_nonzero([list(hoge[0])[i]==list(hoge[1])[i]  for i in range(3)])
print(a)

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

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

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):
ss = [s for s in raw_input()]
ts = [t for t in raw_input()]
cnt = 0
for s, t in zip(ss, ts):
    if s == t:
        cnt += 1
print cnt

Solution (Python):
S = list(input("").strip())
T = list(input("").strip())

L = len(S)

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

print(count)

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()
ans = 0

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

print(ans)

Solution (Python):
a = list(input())
b = list(input())
count = 0

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

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

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

Solution (Python):
X = input()
Y = input()

count = 0
for i in range(0,3):
    if X[i] == Y[i]:
        count += 1

print(count)

Solution (Python):
S = input()
T = input()
count = 0 
for i,j in enumerate(S):
	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 = list(input())

t = list(input())

ans = int(0)

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

Solution (Python):
yohou = input()
tenki = input()

cnt = 0

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

print(cnt)

Solution (Python):
S = input()
T = input()
cnt=0
for i in {1,2,3}:
    if S[i-1]==T[i-1]:
        cnt+=1
print(cnt)

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

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):
x=raw_input()
y=raw_input()
t=0
if x[0]==y[0]:
	t=t+1
if x[1]==y[1]:
	t=t+1
if x[2]==y[2]:
	t=t+1
print t

Solution (Python):

import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline






















def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))

def main():
	S = input()
	S = S[:-1]
	T = input()
	T = T[:-1]

	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)


if __name__ == "__main__":
	main()

Solution (Python):
import math
import copy
import sys
import fractions
import numpy as np
from functools import reduce



def getInputInt():
    inputNum = int(input())
    return inputNum

def getInputListInt():
    outputoData = []
    inputData = input().split()
    outputData = [int(n) for n in inputData]

    return outputData

def getSomeInputInt(n):
    outputDataList = []
    for i in range(n):
        inputData = int(input())
        outputDataList.append(inputData)

    return outputDataList

def getSomeInputListInt(n):
    inputDataList = []
    outputDataList = []
    for i in range(n):
        inputData = input().split()
        inputDataList = [int(n) for n in inputData]
        outputDataList.append(inputDataList)

    return outputDataList



s, = map(str, input().split())
t, = map(str, input().split())

slist = list(s)
tlist = list(t)

ans= 0
for i in range(len(slist)):
    if slist[i] == tlist[i]:
        ans+=1

print(ans)

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

T = input()
real = list(T)

ans = 0

for i in range(3):
    if yohou[i] == real[i]:
        ans = ans+1

print(ans)

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

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

Solution (Python):
S = input()
T = input()
count = 0
for i,s in enumerate(S):
    if s == T[i]:
        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):
s = str(input())
t = list(str(input()))
ans=0
for i,a in enumerate(s):
    if a==t[i]:
        ans+=1
print(ans)

Solution (Python):
s = str(input())
t = list(str(input()))
ans=0
for i,a in enumerate(s):
    if a==t[i]:
        ans+=1
print(ans)

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

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

Solution (Python):
s1 = raw_input()
s2 = raw_input()
ans = 0
for i in xrange(3):
    ans += s1[i] == s2[i]
print ans

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

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

print(count)

Solution (Python):

a = list(input())
b = list(input())
count = 0

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

Solution (Python):
def main():
    S1 = input()
    S2 = input()
    res = 0
    for i, c in enumerate(S1):
        if c == S2[i]:
            res += 1
    print(res)
main()

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):
pre = list(input())
act = list(input())
counter = 0

for i in range(3):
  if  act[i] in pre[i]:
    counter += 1

print(counter)

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

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

T = list(input())

count_value = 0

if len(S) <= 3 and len(T) <= 3:
    for s, t in zip(S, T):
        if s == t:
            count_value += 1
            continue
print(count_value)

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=map(str,input().split())
S=list(S)
S=[t for t in S[0]]
T=map(str,input().split())
T=list(T)
T=[t for t in T[0]]
counter=0
for i in range(3):
  if S[i]==T[i]:
    counter+=1
print(counter)

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

print([S[i] == T[i] for i in range(len(S))].count(True))

Solution (Python):
S = str(input())
T = str(input())
count = 0
if (len(S) == 3 and len(T) ==3):
    if (S[0] == "S" or "C" or "R") and (T[0] == "S" or "C" or "R"):
        if (S[0] == T[0]):
            count += 1
    else:print("error")
    if (S[1] == "S" or "C" or "R") and (T[1] == "S" or "C" or "R"):
        if (S[1] == T[1]):
            count += 1
    else:print("error")
    if (S[2] == "S" or "C" or "R") and (T[2] == "S" or "C" or "R"):
        if (S[2] == T[2]):
            count += 1
    else:print("error")
    print(count)
else:print("error")

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

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

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

count = 0

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

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 = count + 1

print(count)

Solution (Python):

l1 = list(input())
l2 = list(input())
cnt = 0
for x1, x2 in zip(l1, l2):
    if x1 == x2:
        cnt += 1
print(cnt)

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

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

    print(count)


if __name__ == '__main__':
    main()

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

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

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):
a=input()
b=input()
c=[]
d=[]
m=0
for i in a:
    c.append(i)
for i in b:
    d.append(i)

for i in range(len(c)):
    if(c[i]==d[i]):
        m+=1
print(m)

Solution (Python):
a=input()
b=input()
c=[]
d=[]
m=0
for i in a:
    c.append(i)
for i in b:
    d.append(i)

for i in range(len(c)):
    if(c[i]==d[i]):
        m+=1
print(m)

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

test_a()

Solution (Python):

S = input()
T = input()

S = list(S)
T = list(T)

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

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

print(len([True for s, t in zip(S, T) if s == t]))

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

S_list = [c for c in S]
T_list = [c for c in T]

if S[0] == T [0] and S[1] == T [1] and S[2] == T [2]:
  print(3)
  exit()
elif (S[0] == T [0] and S[1] == T [1]) or (S[0] == T [0] and S[2] == T [2]) or (S[2] == T [2] and S[1] == T [1]):
  print(2)
  exit()
elif S[0] != T [0] and S[1] != T [1] and S[2] != T [2]:  
  print(0)
  exit()
print(1)

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

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

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

print(count)

Solution (Python):
a = [input().split() for l in range(2)]
forecast = list(str(a[0]))
real = list(str(a[1]))
count = 0
if forecast[2] == real[2]:
  count = count + 1
if forecast[3] == real[3]:
  count = count + 1
if forecast[4] == real[4]:
  count = count + 1
 
print(str(count))

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