#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  long long int tot = a + b, prev = -1, mx1 = 0, mx2 = 0, aa = a, bb = b;
  for (int i = (0); i <= (n - 1); i++) {
    if (s[i] == '.') {
      if (prev == -1) {
        if (a > b && a > 0) {
          a--;
          prev = 0;
          mx1++;
        } else if (b > 0) {
          b--;
          mx1++;
          prev = 1;
        }
      } else if (prev == 0) {
        if (b > 0) {
          b--;
          mx1++;
          prev = 1;
        } else
          prev = -1;
      } else if (prev == 1) {
        if (a > 0) {
          a--;
          mx1++;
          prev = 0;
        } else
          prev = -1;
      }
    } else
      prev = -1;
  }
  cout << mx1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  cout << setprecision(10);
  clock_t b = clock();
  solve();
  clock_t e = clock();
  cerr << (double(e - b) / CLOCKS_PER_SEC) << " sec";
  return 0;
}
