#include <bits/stdc++.h>
using namespace std;
int n, a, b;
string s;
int sub(int &a, int &b) {
  if (a > b) {
    a--;
    return 0;
  } else
    b--;
  return 1;
}
int main() {
  ios::sync_with_stdio;
  cin >> n >> a >> b >> s;
  int res = 0, prev = -1;
  for (int i = 0; i < s.length(); i++) {
    if (s[i] == '.') {
      if (a <= 0 && b <= 0) break;
      if (prev == -1) {
        res++;
        prev = sub(a, b);
      } else if (prev == 1) {
        if (a > 0) {
          res++;
          a--;
          prev = 0;
        } else
          prev = -1;
      } else if (prev == 0) {
        if (b > 0) {
          res++;
          b--;
          prev = 1;
        } else
          prev = -1;
      }
    }
    if (s[i] == '*') prev = -1;
  }
  cout << res << endl;
  return 0;
}
