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 \(\texttt{pak}\), even when it is superfluous. To understand the importance of this problem, \(\texttt{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 \leq |S| \leq 100)\).

The second line contains a sentence consisting only of small Latin letters \(R\) \((1 \leq |R| \leq 10^6)\).

Output Specification

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

Sample Input 1

haha
ahahahahashes

Sample Output 1

3

Sample Input 2

kek
kekekeklolkekekek

Sample Output 2

6

Comments

There are no comments at the moment.