~/algor $ cat problems/string-qism-satr-necha-marta
Count substring occurrences
Medium
1000 ms
128 MB
53%
Strings $s$ and $t$ of lowercase Latin letters are given. Find how many times $t$ occurs inside $s$. Occurrences may overlap (aba occurs $3$ times in abababa).
Input
The first line contains $s$, the second line $t$.
Output
One integer.
Note
$1 \le |s| \le 10^{5}$
$1 \le |t| \le 10$
$s$ and $t$ consist of lowercase Latin letters only
Examples
Input #1
abababa aba
Output #1
3
Input #2
algor z
Output #2
0