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

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

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

print(count)

Solution (Python):



def ri():
    return int(input())

def rl():
    return list(input().split())

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

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

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

print(c)

Solution (Python):
import sys
sys.setrecursionlimit(10**7)
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x) - 1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def II(): return int(sys.stdin.readline())
def SI(): return sys.stdin.readline().strip()
INF = 10 ** 18
MOD = 10 ** 9 + 7

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

    count = 0
    for s_, t_ in zip(S, T):
        if s_ == t_:
            count += 1

    print(count)


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):
def func():
    S = input()
    T = input()

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

    print(count)


if __name__ == '__main__':
    func()

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]

def code():
    N = input()
    S = input()
    ans = 0
    for i in range(3):
        if N[i]==S[i]:
            ans += 1
    print(ans)

if __name__=='__main__':
    code()

Solution (Python):
"""
N = int(input())
A, B = map(int,input().split())
lst = [list(map(int,input().split())) for i in range(M)]
A = list(map(int,input().split()))
"""

S = input()
T = input()

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

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

print(cnt)

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

for i in range(len(S)):
    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

print(ans)

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

Solution (Python):
s = input()
t = input()
cnt = 0
for i, j in zip(s, t):
  if i == j:
    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=list(input())
T=list(input())

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

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

Solution (Python):
def main(): 
    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)

if __name__ == "__main__":
    main()

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

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()
ans = 0
for a,b in zip(s,t):
    if a == b: ans += 1
print(ans)

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

for x in range(3):
    if a[x] == b[x]:
        c += 1

print(c)

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

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

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

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

print(res)

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

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, T = [input() for _ 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 = input()
T = input()


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

print(ans)

Solution (Python):
import sys

def main():
    input = sys.stdin.readline
    S = str(input().strip())
    T = str(input().strip())

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

    return cnt


if __name__ == '__main__':
    print(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()

print(sum(a == b for a, b in zip(s, t)))

Solution (Python):
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]


def get_nums_l():
    return [ int(s) for s in input().split(" ")]


def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

s = input()
t = input()

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

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

Solution (Python):
if __name__ == '__main__':
    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 = input().strip()
T = input().strip()

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

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

print(val)

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

Solution (Python):
from sys import stdin


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


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):
p_s = input()
a_s = input()

result = 0

for p, a in zip(p_s, a_s):
  if p == a:
    result += 1

print(result)

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

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

ans = 0

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

print(ans)

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

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

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

print(cnt)

Solution (Python):
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()
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):
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 (sum([1 for i in range(3) if S[i] == T[i]]))

Solution (Python):
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,copy,functools
import time

sys.setrecursionlimit(10**7)
inf = 10**20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1,0),(0,1),(1,0),(0,-1)]
ddn = [(-1,0),(-1,1),(0,1),(1,1),(1,0),(1,-1),(0,-1),(-1,-1)]

def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(): return [list(map(int, l.split())) for l in sys.stdin.readlines()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)
def pe(s): return print(str(s), file=sys.stderr)
def JA(a, sep): return sep.join(map(str, a))
def JAA(a, s, t): return s.join(t.join(map(str, b)) for b in a)

def main():
    s = S()
    t = S()
    r = 0
    for i in range(3):
        if s[i] == t[i]:
            r += 1

    return r


print(main())

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

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

print(res)

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

match = 0

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

print(match)

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

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

print(c)

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

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

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

print(res)

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 collections


cot = 0
S1 = input()
S2 = input()
for c1,c2 in zip(S1,S2):
    if c1 == c2 :
        cot += 1
print(cot)

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

Solution (Python):
a = input()
b = input()
ans =0
for i,j in zip(a,b):
    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()
cnt = 0
for i in range(3):
    cnt += int(S[i]==T[i])

print(cnt)

Solution (Python):

import sys


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



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

if __name__ == '__main__':
    main()

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

print(ans)

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

print(ans)

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

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

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

print(count)

Solution (Python):
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools, os, pdb
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)
def perr(s): return print(s, file=sys.stderr)

S = input()
T = input()

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

Solution (Python):
ans = 0
ctr = 0
S = input()
A = input()

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

print(ans)

Solution (Python):
S = input()
R = input()
count = 0
for s,r in zip(S,R):
    if s == r:
        count += 1
print(count)

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

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

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

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

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

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

print(ans)

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

cnt = 0

for i, j in zip(a, b):
  cnt += int(i == j)

print(cnt)

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

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

Solution (Python):
def main():
    s = input()
    t = input()
    res = sum(x == y for x, y in zip(s, t))
    print(res)


if __name__ == "__main__":
    main()

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

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

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

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

print(counter)

Solution (Python):
import sys
from collections import defaultdict
from heapq import *
sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ 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,t=input(),input()
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 = 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(len(s)):
    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 = 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()

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

print(output)

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

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

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

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

Solution (Python):
from collections import defaultdict, deque, Counter
import sys
import heapq
import math



sys.setrecursionlimit(1000000000)

MIN = -10 ** 9
MOD = 10 ** 9 + 7


def main():
    s = input()
    t = input()
    
    
    
    
    
    
    
    
    print(sum(1 for a,b in zip(s,t) if a==b))


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

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

print(int(res))

Solution (Python):
import sys

stdin = sys.stdin
na = lambda: map(int, stdin.readline().split())
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
def main():
  s = ns()
  t = ns()

  cnt = 0
  for ss, tt in zip(s, t):
    if ss == tt:
      cnt += 1

  print(cnt)

main()

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

Solution (Python):



S = list(input())
T = list(input())
ctr = 0

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

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

Solution (Python):
S=input()
T=input()
count=0
for i in range(3):
  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
    return count
if __name__ == '__main__':
    print(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 s, t in zip(S, T):
    if s == t:
        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())

ans = 0
for Si, Ti in zip(S, T):
    if Si == Ti: 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):
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
mod = 10**9+7
Max = sys.maxsize
def l(): 
    return list(map(int,input().split()))
def m(): 
    return map(int,input().split())
def onem(): 
    return int(input())
def s(x): 
    a = []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): 
    return " ".join(map(str,x))
def max2(x): 
    return max(map(max,x))
def In(x,a): 
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False


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

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

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

print(c)

Solution (Python):
import sys
from heapq import heappop, heappush
from operator import itemgetter
from collections import deque, defaultdict, Counter
from bisect import bisect_left, bisect_right
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
MOD = 10**9 + 7
INF = float('inf')

def sol():
    S = input().rstrip()
    T = input().rstrip()

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

    print(ans)


sol()

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

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

print(cnt)

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

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

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

Solution (Python):


import sys

def input(): return sys.stdin.readline().strip()
def list2d(a, b, c): return [[c] * b for i in range(a)]
def list3d(a, b, c, d): return [[[d] * c for j in range(b)] for i in range(a)]
def ceil(x, y=1): return int(-(-x // y))
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def Yes(): print('Yes')
def No(): print('No')
def YES(): print('YES')
def NO(): print('NO')
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

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):
import sys
def input(): return sys.stdin.readline().strip()

s  = lambda: input()

S = s()
T = s()

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

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()
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,y in zip(S,T):
    if x == y:
        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):
import sys


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()
cnt = 0
i = 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=input()
T=input()

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

Solution (Python):
def li():
    return list(map(int, input().split()))


if __name__ == "__main__":
    s = input()
    t = input()

    count = 0
    for si, ti in zip(s, t):
        if si == ti:
            count = 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()
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):
    ans +=int(s[i]==t[i])
print(ans)

Solution (Python):

import sys


def solve(S: str, T: str):
    counter = 0
    for s, t in zip(S, T):
        if s == t:
            counter += 1
    print(counter)
    return



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

if __name__ == '__main__':
    main()

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

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

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

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

if __name__ == "__main__":
    f_a()

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

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

print(ans)

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

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

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

print(ans)

Solution (Python):
from sys import stdin
S = (stdin.readline().rstrip())
T = (stdin.readline().rstrip())
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 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):
c=0
for i,j in zip(input(),input()):
    if i==j:
        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):
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 s,t in zip(S,T):
    if s==t:
        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()

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

print(ans)

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

count = 0
if a[0] == s[0]:
  count += 1
if a[1] == s[1]:
  count += 1
if a[2] == s[2]:
  count += 1
  
print(count)

Solution (Python):
import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

from itertools import product

from itertools import permutations

from itertools import combinations

from itertools import accumulate
from bisect import bisect_left, bisect_right
from heapq import heappush, heappop

import re




import sys
sys.setrecursionlimit(10**9)

def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]
 
def i_inpl(): return int(input())
def l_inpl(): return list(map(int, input().split()))
def line_inpl(x): return [i_inpl() for _ in range(x)]

INF = int(1e30)
MOD = int(1e9)+7 


def create_grid(H, W, value = 0):
    return [[ value for _ in range(W)] for _ in range(H)]



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

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

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

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