#include using namespace std; const int MaxN = (int)1e6 + 10; const int INF = 1e9; int main() { // freopen("input.txt", "r", stdin); // freopen("output.txt", "w", stdout); int n; cin >> n; int cnt = 0; for (int i = 0; i < n; ++i) { string s; cin >> s; bool ok = false; for (int j = 0; j + 1 < (int)s.length(); ++j) { if (s[j] == 'c' && s[j + 1] == 'h' || s[j] == 'h' && s[j + 1] == 'e' || s[j] == 'e' && s[j + 1] == 'f') { ok = true; } } cnt += ok; } cout << cnt << '\n'; return 0; }