#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  long long occ[n];
  for (long long i = 0; i < n; ++i) {
    occ[i] = s[i] == '*';
  }
  vector<long long> segs;
  long long ind = 0;
  for (; ind < n; ++ind) {
    if (occ[ind]) continue;
    long long st = ind;
    while (ind < n && !occ[ind]) ++ind;
    segs.push_back(ind - st);
  }
  long long ans = 0;
  for (long long i : segs) {
    long long x = i / 2;
    long long y = i / 2 + i % 2;
    if (a > b) swap(a, b);
    ans += min(a, x);
    a -= min(a, x);
    ans += min(b, y);
    b -= min(b, y);
  }
  cout << ans << "\n";
}
