Under construction

Still being built. Things may change

Elice Track Matching

Time limit2sMemory limit1024 MB

Summary
Given the track each of N friends applies to and Hellobit's track, count how many friends chose the same track as Hellobit.
Level

Easy1 of 10

Topics
Implementation, String
Solved
No attempts yet

Problem

Elice Track is a KDT (K-Digital Training) program that started in 2020. It has four tracks: Cloud, SW Engineer, IoT, and AI.

The program has graduated over 1,000 students, and many of them now work in the industry. Students who enroll can use the Seongsu and Busan Elice Labs. Each student is guaranteed time for mentoring from working developers. Every track includes two or more projects similar to real work, which students perform and present to receive feedback. The program also offers a developer blog challenge, study groups, the Seongsu Nakнак offline attendance challenge, and networking sessions. After graduation, students receive six months of job placement support, including resume workshops, portfolio workshops, job-specific workshops, and technical interview workshops.

Hellobit was impressed by Elice Track and wants to gather NN friends to apply together. Given the tracks that Hellobit's friends apply to and the track Hellobit applies to, write a program that prints how many of Hellobit's friends apply to the same track as Hellobit.

Input

The first line contains an integer NN, the number of friends. (1≤N≤10 000)(1 \leq N \leq 10\,000)

The second line contains the Elice Track that each of the NN friends applies to, separated by spaces.

The third line contains the Elice Track that Hellobit applies to.

Each track is given as 'C' for Cloud, 'S' for SW Engineer, 'I' for IoT, or 'A' for AI.

Output

Print the number of Hellobit's friends who apply to the same track as Hellobit.

Examples2

  1. Example 1

    Input
    1
    C
    A
    
    Expected output
    0
    
  2. Example 2

    Input
    5
    I A I S S
    S
    
    Expected output
    2