#include using namespace std; using ll = long long; int main(){ int n, a, b; string s; cin >> n >> a >> b >> s; vector p; multiset S; for(int i = 0; i + 3 <= n; i++){ if(s.substr(i, 3) != "con")continue; int cnt = 0; while(i + 3 <= n && s.substr(i, 3) == "con"){ cnt++; i += 3; } p.push_back(cnt); S.insert(cnt); } S.insert(n + 2); int ans = 0; for(int i = 0; i < 10000; i++){ int v = *S.lower_bound(a); if(v == n + 2)break; ans++; S.erase(S.find(v)); S.insert(v - a); v = *S.lower_bound(b); if(v == n + 2)break; ans++; S.erase(S.find(v)); S.insert(v - b); } cout << ans << '\n'; }