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