#include <bits/stdc++.h>
using namespace std;
int n, m, k, a[234000], r, p, q;
char s[234000];
int main() {
  scanf("%d%d%d", &n, &p, &q);
  k = 0;
  scanf("%s", s);
  r = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == '*')
      r = 0;
    else {
      if (r == 0) {
        if (p > q)
          p--, r = 1, k++;
        else if (p < q)
          q--, r = -1, k++;
        else if (p)
          p--, r = 1, k++;
      } else if (r == 1) {
        if (q)
          q--, r = -1, k++;
        else
          r = 0;
      } else if (r == -1) {
        if (p)
          p--, r = 1, k++;
        else
          r = 0;
      }
    }
  }
  cout << k << endl;
}
