#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
char s[maxn];
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  scanf("%s", s);
  int ff = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    if (a == 0 && b == 0) continue;
    if (s[i] == '.') {
      if (ff == 0) {
        if (a >= b) {
          a--;
          ans++;
          ff = 1;
        } else {
          b--;
          ans++;
          ff = 2;
        }
      } else if (ff == 1) {
        if (b > 0) {
          b--;
          ans++;
          ff = 2;
        } else {
          ff = 0;
        }
      } else {
        if (a > 0) {
          a--;
          ans++;
          ff = 1;
        } else {
          ff = 0;
        }
      }
    } else {
      ff = 0;
    }
  }
  printf("%d\n", ans);
}
