Module Module1

    Sub Main()

        Dim S As String = Console.ReadLine()
        Dim T As String = Console.ReadLine()
        Dim i As Integer = 0
        Dim atari As Integer = 0

        For i = 1 To 3
            atari += IIf(Mid(S, i, 1) = Mid(T, i, 1), 1, 0)
        Next

        Console.WriteLine(atari)

        'Console.ReadLine()

    End Sub

End Module
