Substrings
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Walk Alone has a string, and he wants you to count the number of consecutive 'fyt' in the string.

For example, the answer to 'ffyt' is 1 since the second to the fourth character forms a consecutive 'fyt', while 'ffyytt' has no 'fyt' as its substring.

输入描述:

The first line contains an integer , indicating the length of the string.

The second line contains a single string consisting of three characters 'f', 'y', and 't', representing the string.

输出描述:

Output a single integer indicating the number of consecutive 'fyt' in the input string.
示例1

输入

复制
6
fytfyt

输出

复制
2
示例2

输入

复制
9
fytffyytt

输出

复制
1