#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int dy[] = {1, -1, 0, 0, -1, 1, 1, -1};
long long gcd(long long a, long long b) { return !b ? a : gcd(b, a % b); }
long long lcm(long long a, long long b) { return (a / gcd(a, b)) * b; }
long long power(unsigned long long a, unsigned long long b,
                unsigned long long ret = 1LL) {
  while (b--) ret = (ret * a);
  return ret;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  int c = 0, ans = 0, f = 3;
  for (int i = 0; i < s.size(); i++) {
    if (s[i] == '*') {
      f = 3;
      continue;
    }
    if (f == 1 && a) {
      a--;
      ans++;
      f = 2;
    } else if (f == 2 && b) {
      b--;
      ans++;
      f = 1;
    } else if (f == 3) {
      if (a >= b && a) {
        a--;
        ans++;
        f = 2;
      } else if (b > a && b) {
        b--;
        ans++;
        f = 1;
      }
    } else
      f = 3;
    if (!a && !b) break;
  }
  cout << ans;
  return 0;
}
