#include #include using namespace std; int main() { int a=0, b=0, c=0; string str; cin >> str; for (int i = 0; i < str.length(); i++) { if (str[i] == 't' || str[i]=='r') { a++; } if (str[i] == 'e') { b++; } if (a == 2 && b == 2) { c++; a = 0, b = 0; } } cout << c << endl; return 0; }