LogiQuest

463. Jewels and Stones

EasyHash Set

Each character of jewels is a jewel type (case-sensitive). Print how many characters of stones are jewels.

Input format

Line 1: jewels Line 2: stones

Output format

The count.

Example 1

Input

aA
aAAbbbb

Output

3

Example 2

Input

z
ZZ

Output

0

Constraints

1 ≤ lengths ≤ 50

Read input from standard input and print the answer to standard output. Your code is judged against 3 test cases, most of them hidden.

Loading the MyLoginn IDE…