#include <bits/stdc++.h>
using namespace std;
int n, a, b;
char seats[200001];
int main() {
  scanf("%d%d%d", &n, &a, &b);
  scanf("%s", seats);
  int ans = 0;
  char prev = '.';
  for (int i = 0; i < n; ++i) {
    if (seats[i] == '*') {
      prev = '.';
      continue;
    }
    if (prev == 'A' && b > 0) {
      prev = 'B';
      ++ans;
      --b;
    } else if (prev == 'B' && a > 0) {
      prev = 'A';
      ++ans;
      --a;
    } else if (prev == '.' && a > b) {
      prev = 'A';
      ++ans;
      --a;
    } else if (prev == '.' && b > 0) {
      prev = 'B';
      ++ans;
      --b;
    } else
      prev = '.';
  }
  printf("%d\n", ans);
  return 0;
}
