The Hidden 7's

Time Limit: Java: 1000 ms / Others: 1000 ms

Memory Limit: Java: 32768 KB / Others: 32768 KB

Description

Given a string of characters, you may find that the word "seven" is hidden inside. For example, in the string "sesveven", five 7's are hidden:
sesveven sesveven sesveven sesveven sesveven Your task is to count the number of different 7's.

Note

Upper-case letters are considered as the same as the lower-case letters.

Input

Each case gives the string in a line. The length of the string is not more than 10000.

Output

For each test cases, output in a line the number of different 7's hidden inside the string. The result will be less than 2^63.

Sample Input

sesveven
seSvevEn

Sample Output

5
5

Hint

None

Source

ZOJ 7th Anniversary Contest

提交代码