#include <bits/stdc++.h>
using namespace std;
const int maxn = 5000001;
char s[maxn];
int n, a, b;
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 1; i <= n; ++i) {
    scanf(" %c", &s[i]);
  }
  int sum = 0;
  int pre = 0;
  for (int i = 1; i <= n; ++i) {
    if (s[i] == '*') {
      pre = 0;
      continue;
    }
    if (a > 0 && b > 0) {
      if (pre == 0) {
        if (a > b) {
          pre = 1;
          a--;
          sum++;
        } else {
          pre = 2;
          b--;
          sum++;
        }
      } else if (pre == 1) {
        pre = 2;
        b--;
        sum++;
      } else if (pre == 2) {
        pre = 1;
        a--;
        sum++;
      }
    } else if (a == 0 && b != 0) {
      if (pre == 2) {
        pre = 0;
        continue;
      } else {
        pre = 2;
        sum++;
        b--;
      }
    } else if (a != 0 && b == 0) {
      if (pre == 1) {
        pre = 0;
        continue;
      } else {
        pre = 1;
        sum++;
        a--;
      }
    } else if (a == 0 && b == 0) {
      break;
    }
  }
  printf("%d\n", sum);
  return 0;
}
