#include <bits/stdc++.h>
using namespace std;
const int N = 350001;
const int SQRTN = 320;
const int LOGN = 20;
const long double PI = acos(-1);
int n, a, b, ans;
char s[N];
vector<int> v;
signed main() {
  cin >> n >> a >> b;
  scanf(" %s", s);
  for (int i = 0, ctr = 0; i < n; i++) {
    if (s[i] == '.')
      ctr++;
    else {
      if (ctr) v.push_back(ctr);
      ctr = 0;
    }
    if (i == n - 1)
      if (ctr) v.push_back(ctr);
  }
  sort(v.begin(), v.end());
  for (int i = 0, ctr; i < v.size(); i++) {
    ctr = v[i];
    ans += min(a, ctr / 2);
    ans += min(b, ctr / 2);
    a = max(a - (ctr / 2), 0);
    b = max(b - (ctr / 2), 0);
    if (ctr & 1) {
      if (a > b) {
        ans++;
        a--;
      } else {
        if (!b) continue;
        ans++;
        b--;
      }
    }
  }
  cout << ans << endl;
}
