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

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

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

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

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

Solution (Python):
import sys


def main():
    s = sys.stdin.readline().strip()
    t = sys.stdin.readline().strip()

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

    print(ans)


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):
focusts = input()
facts = input()

result = 0
for fo, fa in zip(focusts, facts):
  if fo == fa:
    result += 1

print(result)

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

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

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

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

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

count = 0

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

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

Solution (Python):
import sys
s = sys.stdin.readline()
t = sys.stdin.readline()

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

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

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

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

    print(c - 1)

if __name__ == '__main__':
    main()

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

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

count = 0

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

print(count)

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

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

print(count)

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

    ans = 0

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

    print(ans)


if __name__ == '__main__':
    p_a()

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

print(x)

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

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

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

counter = 0

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

print(counter)

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):
if __name__ == '__main__':
    S = input()
    T = input()
    print(sum(s == t for s, t in zip(S, T)))

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

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

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

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

Solution (Python):


cnt=0
l=list(input())
ll=list(input())

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

Solution (Python):
S=raw_input()
T=raw_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

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

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

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

print(count)

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

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

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

print(cnt)

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

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

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):
from sys import stdin

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

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

input = lambda: stdin.readline()[:-1]
main()

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

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

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

Solution (Python):


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

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
T = input()
ans = 0
for i,s in enumerate(S):
    if s == 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):
def resolve():
    s = input()
    t = input()
    count = 0

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

    print(count)




resolve()

Solution (Python):
predict_tenki = input()
actual_tenki  = input()

result_count = 0
for i in range(len(predict_tenki)):
  if predict_tenki[i] == actual_tenki[i]:
    result_count += 1
    
print(result_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()

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

print(c)

Solution (Python):


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

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

    return ans


if __name__ == '__main__':
    print(main())

Solution (Python):

import bisect
import heapq
import math
import random
import sys
from collections import Counter, defaultdict, deque
from decimal import ROUND_CEILING, ROUND_HALF_UP, Decimal
from functools import lru_cache, reduce
from itertools import combinations, combinations_with_replacement, product, permutations
from operator import add, mul, sub

sys.setrecursionlimit(100000)
input = sys.stdin.readline


def read_int():
    return int(input())


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


def read_float():
    return float(input())


def read_float_n():
    return list(map(float, input().split()))


def read_str():
    return input().strip()


def read_str_n():
    return list(map(str, input().split()))


def error_print(*args):
    print(*args, file=sys.stderr)


def mt(f):
    import time

    def wrap(*args, **kwargs):
        s = time.time()
        ret = f(*args, **kwargs)
        e = time.time()

        error_print(e - s, 'sec')
        return ret

    return wrap


@mt
def slv(S, T):
    return len(list(filter(lambda x: x[0] == x[1], zip(S, T))))


def main():
    S = read_str()
    T = read_str()
    print(slv(S, T))


if __name__ == '__main__':
    main()

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

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

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

cnt = 0
for i, v in enumerate(S):
    if v == 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()

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

Solution (Python):
def main():
    f = list(input())
    r = list(input())
    res = 0
    for i,j in zip(f,r):
        if i==j:
            res += 1
    print(res)

if __name__ == '__main__':
    main()

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

Solution (Python):
s = list(input())
t = list(input())
c = 0
for i,l in enumerate(s):
  if l == 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 = str(input())
T = str(input())
ans = int(0)
count = int(0)


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

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()
print(sum(i == j for i, j 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):

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

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

    print(c)




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    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):
Y = input()
G = input()
Ans = 0
for i in range(3):
  if Y[i] == G[i]:
    Ans = Ans + 1

print(Ans)

Solution (Python):
import sys
INPUT = lambda: sys.stdin.readline().rstrip()
sys.setrecursionlimit(10 ** 9)


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

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

    print(cnt)


if __name__ == '__main__':
    main()

Solution (Python):

S=input()
T=input()

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

print(count)

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

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

print(ans)

Solution (Python):
import sys, math; from collections import deque; readline=sys.stdin.readline;

S = readline().strip()
T = readline().strip()

print([s==t for s,t in zip(S, T)].count(True))

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

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

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

if __name__ == '__main__':
    main()

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

sum = 0

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

print(sum)

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

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

atari = 0

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

print(atari)

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

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

Solution (Python):
import sys
sys.setrecursionlimit(int(1e6))

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
for i in range(len(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 += 1
print(cnt)

Solution (Python):

"""
AtCoder A
"""

import sys, math, random
import numpy as np








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 LLS(): return [list(sys.stdin.readline().rstrip()) for _ 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 main():
    A=S()
    B=S()
    out=0
    if A[0]==B[0]:
        out+=1
    if A[1]==B[1]:
        out+=1
    if A[2]==B[2]:
        out+=1
    print(out)


if __name__ == "__main__":
    main()

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

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

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

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

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

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

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

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

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

Solution (Python):
import sys
stdin = sys.stdin
sys.setrecursionlimit(100001)
mod = 10**9 + 7

ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sa = lambda h: [list(map(int, stdin.readline().split())) for i in range(h)]

s = ns()
t = ns()
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,j in zip(s,t):
    if i == j:
        count +=1

print (count)

Solution (Python):
import sys
input = sys.stdin.readline
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()
l = 0
for i in range(len(s)):
    if s[i]==t[i]:
        l+=1
print(l)

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

Solution (Python):


S = input()
T = input()

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

print(res)

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

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

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

print(count)

Solution (Python):


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


if __name__ == "__main__":
    main()

Solution (Python):
s=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().split()[0]
T = input().split()[0]

c = 0

for s, t in zip(S, T):
    if s == t:
        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):
pred = input()
real = input()
out = 0

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

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





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

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

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

big_prime = 1000000007

"""


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


 =  int(sys.stdin.readline())
 =  map(int, sys.stdin.readline().split())
 =  list(map(int, sys.stdin.readline().split()))
 =  [list(map(int,list(sys.stdin.readline().split()))) for i in range(N)]
"""
s =  list(sys.stdin.readline().rstrip())
t =  list(sys.stdin.readline().rstrip())
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):
import sys


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

print(res)

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

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


    print(cnt)


main()

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):
forecast = input()
result = input()

ret = 0

for i in range(3):
    if forecast[i] == result[i]:
        ret += 1

print(ret)

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

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

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

print(counter)

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

ans=0
for i in range(3):
    if a[i]==b[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()
count = 0

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

print(count)

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

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

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

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

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

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

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

print(ans)

Solution (Python):

import sys


def ILI(): return list(map(int, sys.stdin.readline().rstrip().split()))
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
def II(): return int(sys.stdin.readline().rstrip())
def ISS(): return sys.stdin.readline().rstrip().split()
def IS(): return sys.stdin.readline().rstrip()

S = IS()
T = IS()
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()
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()
cnt = 0

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

Solution (Python):
import sys
def main():
    input = sys.stdin.readline
    S = input()
    T = input()

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

    print(ans)

if __name__ == '__main__':
    main()

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

print(count)

Solution (Python):
import sys
input = sys.stdin.readline
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):
a = input()
b = input()
ans = sum(a[i] == b[i] for i in range(3))
print(ans)

Solution (Python):
a = input()
b = input()
ans = sum(1 if x==y else 0 for x,y in zip(a,b))
print(ans)

Solution (Python):

import numpy as np

if __name__ == '__main__':
    S = input()
    T = input()

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

    print(count)

Solution (Python):
a, b, c = input()
d, e, f = input()
result=0
if a==d:
    result+=1
if b==e:
    result+=1
if c==f:
    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 = 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()
c=0
for i in range(3):
    if s[i] == t[i]:
        c +=1
    else:
        c=c

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

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

print(count)

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

S1 = input()
S2 = input()

Ans = 0
for i in range(3):
  if S1[i]==S2[i]:
    Ans += 1

print(Ans)