#include #include #include using namespace std; int main() { cin.tie(0); ios::sync_with_stdio(false); int tree = 0; string S; cin >> S; int len = S.length(); for (int i = 0; i < len; i++) { if (S[i] == 'e') { tree++; } } cout << tree/2 << endl; return 0; }