#include #include #include #include using namespace std; int main() { string s; cin >> s; vector v(100,0); for(int it:s) v[it] += 1; v[int('e')] /= 2; cout << min({v[int('t')],v[int('r')],v[int('e')]}); return 0; }