#P8195. [传智杯 #4 决赛] 小智的疑惑

[传智杯 #4 决赛] 小智的疑惑

Problem Description

Chuanzhi Vocational College gave Xiaozhi a string ss that contains only lowercase letters. He wants to know how many times the substring chuanzhi appears in it.

We say a string tt is a substring of ss if and only if, after deleting some consecutive characters at the beginning of ss (possibly 0 characters) and some consecutive characters at the end of ss (possibly 0 characters), the remaining string is exactly the same as tt. For example, ab is a substring of abc, but ac is not a substring of abc.

Input Format

The input consists of one line containing a string ss.

Output Format

Output one line with one integer, representing the answer.

welcometochuanzhicupchuanzhi
2

Hint

Constraints

For all testdata, it is guaranteed that 1s4×1051 \leq |s| \leq 4 \times 10^5. Here, s|s| denotes the length of ss, and ss contains only lowercase letters.

Translated by ChatGPT 5