Nineteen

题意翻译

###### 题目描述: Alice非常喜欢“nineteen”这个词。她有一个字符串S,并希望字符串中包含尽可能多的此单词。因此,她可以重新排列字符串的字母。 举个例子,如果她有字符串“xiineteenppnnnewtnee”,她可以得到字符串“xnineteenppnineteenw”,其中包含两个“nineteen”。她可以在不跳过任何字母的情况下从字符串的任意位开始读“nineteen”的次数。 请帮助她找到她能得到的最多的“nineteen”个数。 ------------ ###### 输入输出格式: #### 输入格式: 第一行包含非空字符串S,仅由小写的英文字母组成。保证S的长度不超过100。 #### 输出格式: 输出一个整数——她能得到的最多的“nineteen”个数。

题目描述

Alice likes word "nineteen" very much. She has a string $ s $ and wants the string to contain as many such words as possible. For that reason she can rearrange the letters of the string. For example, if she has string "xiineteenppnnnewtnee", she can get string "xnineteenppnineteenw", containing (the occurrences marked) two such words. More formally, word "nineteen" occurs in the string the number of times you can read it starting from some letter of the string. Of course, you shouldn't skip letters. Help her to find the maximum number of "nineteen"s that she can get in her string.

输入输出格式

输入格式


The first line contains a non-empty string $ s $ , consisting only of lowercase English letters. The length of string $ s $ doesn't exceed 100.

输出格式


Print a single integer — the maximum number of "nineteen"s that she can get in her string.

输入输出样例

输入样例 #1

nniinneetteeeenn

输出样例 #1

2

输入样例 #2

nneteenabcnneteenabcnneteenabcnneteenabcnneteenabcii

输出样例 #2

2

输入样例 #3

nineteenineteen

输出样例 #3

2