#include <bits/stdc++.h>
using namespace std;
char s[220000];
int n, a, b;
int be[220000];
int num[220000];
int tot;
int main() {
  while (scanf("%d%d%d", &n, &a, &b) != EOF) {
    scanf("%s", s + 1);
    tot = 0;
    int cnt = 0;
    for (int i = 1; i <= n; i++) {
      if (i == 1) {
        if (s[i] == '.') {
          be[++tot] = i;
          cnt++;
        }
        continue;
      }
      if (s[i - 1] == '*' && s[i] == '.') {
        num[tot] = cnt;
        cnt = 0;
        be[++tot] = i;
      }
      if (s[i] == '.') cnt++;
    }
    if (cnt) num[tot] = cnt;
    if (!tot) {
      printf("0\n");
      continue;
    }
    int res = 0;
    for (int i = 1; i <= tot; i++) {
      int temp1, temp2;
      temp1 = num[i] / 2;
      if (num[i] & 1)
        temp2 = temp1 + 1;
      else
        temp2 = temp1;
      if (a > b) {
        res += min(a, temp2);
        res += min(b, temp1);
        a -= min(a, temp2);
        b -= min(b, temp1);
      } else {
        res += min(a, temp1);
        res += min(b, temp2);
        a -= min(a, temp1);
        b -= min(b, temp2);
      }
      if (!a && !b) break;
    }
    printf("%d\n", res);
  }
  return 0;
}
