Problems
Bessie and Elsie are plotting to overthrow Farmer John at last! They plan it out over N (
However, Farmer John hears of the plan and attempts to intercept their conversation. Thus, some letters of
The excitement level of a non-obfuscated conversation is the number of times a cow double-sends - that is, the number of occurrences of substring
Input
The first line will consist of one integer
The next line contains
Output
First output
Example #1
4
BEEF
2
1
2
Example #2
9
FEBFEBFEB
2
2
3
Example #3
10
BFFFFFEBFE
3
2
4
6