#300. 统计子串'hi'出现次数

    ID: 300 Type: Default 1000ms 256MiB Tried: 0 Accepted: 0 Difficulty: (None) Uploaded By: Tags>codingbatString-2gesp3字符串

统计子串'hi'出现次数

Count 'hi' Occurrences

Background

Congcong is currently learning about string manipulation. He encountered an interesting problem that requires counting the occurrences of a specific substring within a given string.

Problem Description

Return the number of times that the string "hi" appears anywhere in the given string.

Input Format

Input is given from standard input in the following format.

A string SS.

Output Format

Output is printed to standard output in the following format.

An integer representing the number of occurrences of the substring "hi".

Sample

abc hi ho
1
ABChi hi
2
hihi
2

Sample Explanation

For the first sample input "abc hi ho\