#include <bits/stdc++.h>
int n, a, b, lst = 0, sum = 0, i = 0;
char q;
int main() {
  scanf("%d %d %d", &n, &a, &b);
  sum = a + b;
  while (q <= 32) q = getchar();
  while (i < n) {
    if (q == '*') lst = 0;
    if (q == '.') {
      if (lst == 1 && b > 0)
        b--, lst = 2;
      else if (lst == 2 && a > 0)
        a--, lst = 1;
      else if (lst == 0 && (a > 0 || b > 0)) {
        if (a >= b)
          a--, lst = 1;
        else
          b--, lst = 2;
      } else
        lst = 0;
    }
    q = getchar();
    i++;
  }
  printf("%d\n", sum - a - b);
  return 0;
}
