#include <bits/stdc++.h>
using namespace std;
const int N = 3e5 + 10;
int num[N];
char str[N];
char ans[N];
int main() {
  int n, a[3];
  scanf("%d%d%d", &n, &a[1], &a[2]);
  scanf("%s", str);
  int sum = 0;
  int flag;
  if (a[1] >= a[2])
    flag = 1;
  else
    flag = 2;
  for (int i = 0; i < n; i++) {
    if (str[i] == '.') {
      if (flag) {
        if (a[flag] > 0)
          a[flag]--, sum++, ans[i] = 64 + flag, flag = (flag == 1 ? 2 : 1);
        else if (a[(flag == 1 ? 2 : 1)] > 0) {
          if (str[i + 1] == '*' || i + 1 >= n) {
            ans[i] = '.';
            ans[++i] = '*';
            flag = 0;
            continue;
          }
          a[(flag == 1 ? 2 : 1)]--;
          sum++;
          ans[i] = '.';
          i++;
          ans[i] = 64 + (flag == 1 ? 2 : 1);
        } else
          ans[i] = str[i];
      } else {
        if (a[1] <= 0 && a[2] <= 0) {
          ans[i] = str[i];
          continue;
        }
        if (a[1] >= a[2])
          a[1]--, sum++, flag = 2, ans[i] = 'A';
        else if (a[1] < a[2])
          a[2]--, sum++, flag = 1, ans[i] = 'B';
      }
    } else
      flag = 0, ans[i] = '*';
  }
  ans[n] = '\0';
  cout << sum << endl;
  return 0;
}
