#include <bits/stdc++.h>
using namespace std;
int n, a, b, c, d, e;
char s[200100];
int main() {
  scanf("%d%d%d%s", &n, &a, &b, s + 1);
  for (int i = 1; i <= n; i++) {
    if (s[i] == '*') {
      c += e / 2;
      d += e % 2;
      e = 0;
    } else
      e++;
  }
  c += e / 2;
  d += e % 2;
  printf("%d\n", min(c, a) + min(c, b) + min(d, max(0, a - c) + max(0, b - c)));
  return 0;
}
