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

import sys







"""Template"""


class IP:
    """
    入力を取得するクラス
    """

    def __init__(self):
        self.input = sys.stdin.readline

    def I(self):
        """
        1文字の取得に使います
        :return: int
        """
        return int(self.input())

    def S(self):
        """
        1文字の取得(str
        :return: str
        """
        return self.input()

    def IL(self):
        """
        1行を空白で区切りリストにします(int
        :return: リスト
        """
        return list(map(int, self.input().split()))

    def SL(self):
        """
        1行の文字列を空白区切りでリストにします
        :return: リスト
        """
        return list(map(str, self.input().split()))

    def ILS(self, n):
        """
        1列丸々取得します(int
        :param n: 行数
        :return: リスト
        """
        return [int(self.input()) for _ in range(n)]

    def SLS(self, n):
        """
        1列丸々取得します（str
        :param n: 行数
        :return: リスト
        """
        return [self.input() for _ in range(n)]

    def SILS(self, n):
        """
        Some Int LineS
        横に複数、縦にも複数
        :param n: 行数
        :return: list
        """
        return [self.IL() for _ in range(n)]

    def SSLS(self, n):
        """
        Some String LineS
        :param n: 行数
        :return: list
        """
        return [self.SL() for _ in range(n)]


class Idea:
    def __init__(self):
        pass

    def HF(self, p):
        """
        Half enumeration
        半分全列挙です
        pの要素の和の組み合わせを作ります。
        ソート、重複削除行います
        :param p: list : 元となるリスト
        :return: list : 組み合わせられた和のリスト
        """
        return sorted(set(p[i] + p[j] for i in range(len(p)) for j in range(i, len(p))))

    def Bfs2(self, a):
        """
        bit_full_search2
        bit全探索の改良版
        全探索させたら2進数のリストと10進数のリストを返す
        :return: list２つ : １個目 2進数(16桁)  2個目 10進数
        """
        
        
        
        value = []
        for i in range(1 << len(a)):
            output = []

            for j in range(len(a)):
                if self.bit_o(i, j):
                    """右からj+1番目のiが1かどうか判定"""
                    
                    output.append(a[j])
            value.append([format(i, 'b').zfill(16), sum(output)])

        value.sort(key=lambda x: x[1])
        bin = [value[k][0] for k in range(len(value))]
        val = [value[k][1] for k in range(len(value))]
        return bin, val

    def S(self, s, r=0, m=-1):
        """
        ソート関係行います。色々な設定あります。
        :param s: 元となるリスト
        :param r: reversするかどうか 0=False 1=True
        :param m: （2次元配列）何番目のインデックスのソートなのか
        :return: None
        """
        r = bool(r)
        if m == -1:
            s.sort(reverse=r)
        else:
            s.sort(reverse=r, key=lambda x: x[m])

    def bit_n(self, a, b):
        """
        bit探索で使います。0以上のときにTrue出します
        自然数だからn
        :param a: int
        :param b: int
        :return: bool
        """
        return bool((a >> b & 1) > 0)

    def bit_o(self, a, b):
        """
        bit探索で使います。1のときにTrue出すよ
        oneで1
        :param a: int
        :param b: int
        :return: bool
        """
        return bool(((a >> b) & 1) == 1)

    def ceil(self, x, y):
        """
        Round up
        小数点切り上げ割り算
        :param x: int
        :param y: int
        :return: int
        """
        return -(-x // y)

    def ave(self, a):
        """
        平均を求めます
        :param a: list
        :return: int
        """
        return sum(a) / len(a)

    def gcd(self, x, y):
        if y == 0:
            return x
        else:
            return self.gcd(y, x % y)

    def lcm(self, x, y):
        return (x * y) // self.gcd(x, y)


"""ここからメインコード"""


def main():
    
    r, e = range, enumerate
    ip = IP()
    id = Idea()

    """この下から書いてね"""
    s = input()
    t = input()
    ans = 0
    for x, y in zip(s, t):
        if x == y:
            ans += 1
    print(ans)



main()

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

i = 0

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

print(i)

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()
result=0
if s[:1]==t[:1]:
    result=result+1

if s[1:2]==t[1:2]:
    result=result+1

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

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

k = 0
count = 0
while k < 3:
    if s[k] == t[k]:
        count += 1
    k += 1
print(count)

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

count = 0

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

print(count)

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

Solution (Python):
T = list(input())
S = 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()
result=0
if s[:1]==t[:1]:
    result=result+1

if s[1:2]==t[1:2]:
    result=result+1

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

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

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

print(n)

Solution (Python):
yosou = input()
yosoulist = list(yosou)
yosou2 = input()
yosoulist2 = list(yosou2)
count = 0

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

Solution (Python):
G = input()
P = input()
assert len(G) == len(P)
print(sum([1 for g, p in  zip(G, P) if g == p]))

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

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

print(k)

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

Solution (Python):
weather1 = input()
weather2 = input()
match = 0
for i in range(0,3):
    if weather1[i] == weather2[i]:
        match += 1
print(match)

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

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

print(count)

Solution (Python):
ls=[input() for i in range(2)]

j=0
for i in range(3):
    if(ls[0][i]==ls[1][i]):
        j+=1
        
print(j)

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

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

Solution (Python):
a, b, c = input()  
d, e, f = input()  

if a==d:
  o = 1
else:
  o = 0
  
if b==e:
  p = 1
else:
  p = 0

if c==f:
  q = 1
else:
  q = 0

print(o+p+q)

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

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

t=0
for i in range(len(yoso)):
    if yoso[i] == result[i]:
        t += 1
    else:
        t += 0
print(t)

Solution (Python):

s = input()
t = input()

list(s)
list(t)

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

elif s[0] == t[0] and s[1] != t[1] and s[2] == t[2]:
    print(2)

elif s[0] != t[0] and s[1] == t[1] and s[2] == t[2]:
    print(2)

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)

else:
    print(0)

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

i = 0
result = 0
for item in [0,0,0]:
    if S[i] == T[i]:
        result += 1
    i += 1

print(result)

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

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


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

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

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

print(ans)

Solution (Python):
import sys

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

s = list(s.rstrip('\n'))
t = list(t.rstrip('\n'))

u = list(map(lambda x, y: x == y, s, t))
print(u.count(True))

Solution (Python):
str = [input() for i in range(2)]
num = 0
if (str[0][0] == str[1][0]):
    num = num +1
if (str[0][1] == str[1][1]):
    num = num +1
if (str[0][2] == str[1][2]):
    num = num +1
print(num)

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(sum([1 for s,t in zip(S,T) if s == t]))

Solution (Python):
yohou = list(input())
jissai = list(input())
ans = 0

if yohou[0] == jissai[0]:
  ans = ans + 1
if yohou[1] == jissai[1]:
  ans = ans + 1
if yohou[2] == jissai[2]:
  ans = ans + 1
  
print(ans)

Solution (Python):
S = str(input())
T = str(input())
judgeList = []

for i in range(3):
    if S[i] == T[i]:
        judgeList.append("true")
print(len(judgeList))

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

Solution (Python):



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

cnt = 0

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

print(cnt)

Solution (Python):
s = list(map(str, input()))

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

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

Solution (Python):
from sys import stdin
s = stdin.readline().rstrip()
t = stdin.readline().rstrip()
c=0
for i in range(3):
	if s[i] == t[i]:
		c+=1

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

print(cnt)

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

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


if __name__ == "__main__":
    S = list(input())
    T = list(input())
    print(solve(S, T))

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

Solution (Python):
a = [raw_input() for i in range(2)]
str1 = list(a[0])
str2 = list(a[1])
count = 0
for i in range(3):
  if str1[i]==str2[i]:
    count += 1

print(count)

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

s = list(S)
t = list(T)

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

Solution (Python):

T = input()
S = input()

ans = 0

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

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):
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 += 1
  else:
    count = count
print(count)

Solution (Python):
S = input()
T = input()
n = 0
i = 0
while i < len(S):
    if (S[i] == T[i]):
        n += 1
    i += 1
print(n)

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

print(count)

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

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

s = ns()
t = ns()

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

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

Solution (Python):
s=input()
t=input()
cnt = 0
for idx, c in enumerate(s):
  if t[idx] == c:
    cnt +=1
print(cnt)

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

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

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

s = list(S)
t = list(T)

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

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

import sys
input = sys.stdin.readline

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

print(ans)

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

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

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

print(H)

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

import numpy as np

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


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

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

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

Solution (Python):
"""
https://atcoder.jp/contests/abc139/tasks/abc139_a
"""


def calc(S: str, T: str) -> int:
    hit = [s == t for s, t in zip(S, T)]
    return sum(hit)


def main() -> None:
    S = input()
    T = input()
    result = calc(S, T)
    print(result)


main()

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

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

print(cnt)

Solution (Python):

 
pred = list(input())
res = list(input())

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

match_day = 0

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

print(match_day)

Solution (Python):
s_s = list(input())
t_s = list(input())

count = 0
for s, t in zip(s_s, t_s):
  if s == t:
    count += 1

print(count)

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

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


count = 0

for i in range(3):
    if forecast[i] == real[i]:
        count += 1
    else:
        pass

print(count)

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

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

print(c)

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
S=input()
T=input()
cnt=0
l=len(S)

for i in range(l):
	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):
l1=list(input())
l2=list(input())
w=len(l1)
all=0
for i in range(0,w):
    if (l1[i]==l2[i]):
        all=all+1
print(all)

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

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

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

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

def getN():
    return int(input())
def getList():
    return list(map(int, input().split()))
import math

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

print(ans)

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

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

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

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

print(eq)

Solution (Python):
S1, S2, S3 = input()
T1, T2, T3 = input()

count = 0

if S1 == T1:
  count += 1

if S2 == T2:
  count += 1

if S3 == T3:
  count += 1

print(count)

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

for n in range(len(yohou)):
  count += 1 if yohou[n] == result[n] else 0

print(count)

Solution (Python):
S=list(input())
T=list(input())
A=[]
for i in range(3):
  if S[i]==T[i]:
    A.append(1)
  else:
    A.append(0)
b=A.count(1)
print(b)

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

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

for i in range(len(S)):
    if(S[i]==R[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()
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):
Y=input()
S=input()
print(sum([1 for a,b in zip(Y,S) if a==b]))

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

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

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

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

cnt = 0

for i, j in zip(s, t):

    if i == j:
        cnt += 1

print(cnt)

Solution (Python):
S, T = input(), 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()
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(3):
    if(S[i] == T[i]):count = count + 1

print(count)

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

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

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

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

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

print(x)

Solution (Python):

S = input().strip()
T = input().strip()

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

Solution (Python):
S = input()
T = input()
answer = sum(1 if s == t else 0 for s,t in zip(S,T))
print(answer)

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(str(input()))
t = list(str(input()))
x = 0
for s,t in zip(s,t):
    if s == t:
        x += 1
print(x)

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

print(ans)

Solution (Python):
def main(S, T):
    count = 0

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

    return count


if __name__ == "__main__":
    S = input()
    T = input()
    print(main(S, T))

Solution (Python):
import sys


		
def main():
	s = input()
	t = input()
	ret=sum([1 for y,r in zip(s,t) if y == r])
	print(ret)
	
	



if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

print(ans)

Solution (Python):
s=input()
t=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])or(s[1]==t[1] and s[2]==t[2])or(s[0]==t[0] and s[2]==t[2]):
    print("2")
elif s[0]==t[0] or s[1]==t[1] or s[2]==t[2]:
    print("1")
else:
    print("0")

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

Solution (Python):
from enum import Enum
from queue import Queue
import collections

import sys
import math

BIG_NUM = 2000000000
MOD = 1000000007
EPS = 0.000000001

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

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

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

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

print(n)

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

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

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

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):
A = str(input())
B = str(input())
C = 0
for i in range(3):
  if A[i] == B[i]:
    C += 1
print(C)

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

Solution (Python):





from sys import stdin,setrecursionlimit


setrecursionlimit(10**6)
input=stdin.readline

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

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

for i in range(3):
  if S[i] == T[i] : ans +=1
  else : next
    
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 = 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()
c = 0
for i in range(3):
  if s[i] == t[i]:
    c += 1
print(str(c))

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

import sys
sys.setrecursionlimit(10**6)
write = sys.stdout.write
dbg = lambda *something : print(*something) if DEBUG else 0
DEBUG = False
def main(given = sys.stdin.readline):
    input = lambda : given().rstrip()
    LMIIS = lambda : list(map(int,input().split()))
    II = lambda : int(input())
    XLMIIS = lambda x : [LMIIS() for _ in range(x)]


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


if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
predict = input()

actual = input()

count = 0

for index in range(0, len(predict)):
    if predict[index] == actual[index]:
        count += 1

print (count)

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

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

Solution (Python):
S = input()
T = input()
count = 0
forecastlist = []
realweatherlist = []
for forecast in S:
  forecastlist.append(forecast)
for weather in T:
  realweatherlist.append(weather)
  
for i in range(3):
  if forecastlist[i] == realweatherlist[i]:
    count += 1
print(count)

Solution (Python):
import math

s = input()
t = input()


ret = [1 if si==ti else 0 for si, ti in zip(s, t)]

print(sum(ret))

Solution (Python):
yohou= input()
tenki= input()
num=0
x=0
for i in range(3):
    if tenki[x] == yohou[x]:
        num=num+1
    else:
        num=num
    x=x+1
print(num)

Solution (Python):
s=list(input())
t=list(input())
cnt = 0
for i,v in enumerate(s):
  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=cnt+1

print(cnt)

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

print(num)

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

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

Solution (Python):
import sys
count = 0
lines = sys.stdin.readlines()
for i in range(3):
  if lines[0][i]==lines[1][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=list(input())
t=list(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)