#include <bits/stdc++.h>
using namespace std;
const int inf = 2000000007;
string s;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  cin >> s;
  int ta = a, tb = b;
  for (int i = 0; i < n; i++) {
    if (s[i] == '*') {
      continue;
    }
    int j = i;
    while (s[j] == '.') {
      j++;
    }
    int t = j - i;
    if (t % 2 == 0) {
      a -= (t / 2);
      b -= (t / 2);
    } else {
      a -= (t / 2);
      b -= (t / 2);
      if (a > b) {
        a -= 1;
      } else {
        b -= 1;
      }
    }
    i = j;
  }
  if (a <= 0 && b <= 0) {
    cout << ta + tb << endl;
  } else if (a > 0 && b > 0) {
    cout << (ta + tb) - a - b << endl;
  } else if (a > 0 && b <= 0) {
    cout << tb + (ta - a) << endl;
  } else {
    cout << ta + (tb - b) << endl;
  }
  return 0;
}
