시간 제한메모리 제한제출정답맞힌 사람정답 비율
1 초 128 MB141916763.208%

문제

Write a program to count the occurrences of a particular word in a given text i.e. how many times does a particular word appear in a text?

입력

The first line contains a single word to search. A word contains at most 20 characters. The next line and the rest is a text to search for that word. The text can contain up to 100 lines including blank lines. No line exceeds 250 characters. A word cannot be separated in different lines i.e. a whole word must appear in the same line. However, a word can appear as a part of a longer word.

출력

Print out the number of occurrences of the word to search. This is a case-sensitive search.

예제 입력 1

word
Write a program to count the occurrences
of a particular word in a given text
i.e. how many times does a particular
word appear in a text? This Word is not counted
but wording is counted.

예제 출력 1

3