#include <bits/stdc++.h>
using namespace std;
const int mxn = 1e5 + 1;
string s;
int n;
int next(int i) {
  while (i < n && s[i] == '*') i++;
  return i;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long t = 1;
  while (t--) {
    int a, b, i;
    int ans = 0;
    cin >> n >> a >> b;
    cin >> s;
    i = 0;
    while (1) {
      i = next(i);
      int ta = a;
      int tb = b;
      int h = 0;
      int j = 0;
      int mx = 0, mxa, mxb;
      int idx = i;
      if (i >= n) break;
      int cnt = 0;
      while (i < n && s[i] == '.') {
        cnt++;
        i++;
      }
      int left = cnt / 2;
      int right = cnt - left;
      if (left < right) swap(left, right);
      int temp, temp2;
      if (a > b) {
        temp = min(a, left);
        a -= temp;
        left -= temp;
        if (left > right) swap(left, right);
        temp2 = min(b, right);
        b -= temp2;
      } else {
        temp = min(b, left);
        b -= temp;
        left -= temp;
        if (left > right) swap(left, right);
        temp2 = min(a, right);
        a -= temp2;
      }
      ans += temp + temp2;
    }
    cout << ans;
  }
  return 0;
}
