The magician Vasya


Submit solution

Points: 100 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem type

Mr. Vasya is a famous magician from Irshava. You may not know that people in Irshava often use the word pak, even when it is superfluous. To understand the importance of this problem, 6-pak is not only a block of beer, but also a sentence from Irshava. The magician Vasya plans to visit another city, but for this, he needs to get rid of the filler words not to look like he is from Irshava. This time you need to count the number of filler word occurrences in the sentence.

Input Specification

The first line contains the filler word S (1|S|100).

The second line contains a sentence consisting only of small Latin letters R (1|R|106).

Output Specification

Print the number of the given filler word occurrences in the sentence.

Sample Input 1

Copy
haha
ahahahahashes

Sample Output 1

Copy
3

Sample Input 2

Copy
kek
kekekeklolkekekek

Sample Output 2

Copy
6

Comments

There are no comments at the moment.