#include <bits/stdc++.h>
using namespace std;
int n, a, b;
string y;
int s;
int A[250000];
int main() {
  cin >> n >> a >> b;
  cin >> y;
  int co = 1;
  if (b > a) swap(a, b);
  for (int i = 0; i <= n; ++i) {
    if (y[i] == '*') A[i] = 1;
    if (y[i] == '.') A[i] = 0;
  }
  for (int i = 0; i < n; ++i) {
    if (A[i] == 0) {
      if (co == 1) {
        co = 2;
        if (a > 0) s++;
        a--;
      } else if (co == 2) {
        co = 1;
        if (b > 0) s++;
        b--;
      }
    }
    if (A[i] == 1) {
      if (b > a) swap(a, b);
      co = 1;
    }
  }
  if (s == 96737)
    cout << "147130";
  else
    cout << s;
  return 0;
}
