#include <bits/stdc++.h>
char car[2000001] = {};
int count = 0;
int seats;
int prog, ath;
void rec(int index, int a) {
  if (prog <= 0 && ath <= 0) return;
  if (index >= seats) return;
  if (car[index] == '*') {
    rec(index + 1, 0);
  } else {
    if (a == 1) {
      if (prog <= 0)
        return rec(index + 1, -1);
      else {
        prog--;
        count++;
      }
      return rec(index + 1, -1);
    } else if (a == -1) {
      if (ath <= 0)
        return rec(index + 1, 1);
      else {
        ath--;
        count++;
      }
      return rec(index + 1, 1);
    } else {
      if (prog > ath) {
        if (prog <= 0)
          return rec(index + 1, -1);
        else {
          prog--;
          count++;
        }
        return rec(index + 1, -1);
      } else {
        if (ath <= 0)
          return rec(index + 1, 1);
        else {
          count++;
          ath--;
        }
        return rec(index + 1, 1);
      }
    }
  }
}
int main() {
  scanf("%d %d %d", &seats, &prog, &ath);
  getchar();
  for (int a1 = 0; a1 < seats; a1++) {
    scanf("%c", &car[a1]);
  }
  rec(0, 0);
  printf("%d\n", count);
}
