Skip to main content
LIVE CONTEST: Round #7 · Begin Marathon is live now! …

~/algor $ cat problems/string/how-many-times-a-letter-occurs

How many times a letter occurs

Author Iqbolshoh Ilhomjonov 3 @iqbolshoh 650 problems
Easy 1000 ms 128 MB 22%
Share

A string and a letter are given. Find how many times occurs in the string.

Counting the characters of the string that match the given one

Input

The first line contains the string , the second line a single letter .

Output

One integer.

Note


consists of lowercase Latin letters (a–z) only
is a lowercase Latin letter

Examples

Input #1
banana
a
Output #1
3
Input #2
salom
z
Output #2
0

Sign in to submit a solution

Signing up is free and takes a minute.