#include <bits/stdc++.h>
char s[200005];
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  scanf("%s", s);
  int len = 0;
  int ans = 0;
  for (int i = 0; i <= n; i++) {
    if (s[i] == '.')
      len++;
    else {
      if (len == 0) continue;
      if (a < b) {
        int tmp = a;
        a = b;
        b = tmp;
      }
      if (a >= (len + 1) / 2) {
        a -= (len + 1) / 2;
        ans += (len + 1) / 2;
      } else {
        ans += a;
        a = 0;
      }
      if (b >= len / 2) {
        b -= len / 2;
        ans += len / 2;
      } else {
        ans += b;
        b = 0;
      }
      len = 0;
    }
  }
  printf("%d\n", ans);
  return 0;
}
