#include <bits/stdc++.h>
using namespace std;
int t[211111];
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '*') t[i] = 1;
  }
  if (a == 0 && b == 0) {
    cout << 0 << endl;
    return 0;
  }
  int ans = 0;
  if (t[0] == 0) {
    if (a > b) {
      a--;
      t[0] = 2;
    } else {
      b--;
      t[0] = 3;
    }
    ans++;
  }
  if (a == 0 && b == 0) {
    cout << ans << endl;
    return 0;
  }
  for (int i = 1; i < n; i++) {
    if (t[i] == 1) continue;
    if (a > b) {
      if (t[i - 1] != 2) {
        t[i] = 2;
        a--;
        ans++;
      } else if (b != 0) {
        t[i] = 3;
        b--;
        ans++;
      }
    } else {
      if (t[i - 1] != 3) {
        t[i] = 3;
        b--;
        ans++;
      } else if (a != 0) {
        t[i] = 2;
        a--;
        ans++;
      }
    }
    if (a == 0 && b == 0) break;
  }
  cout << ans << endl;
}
