#include <bits/stdc++.h>
using namespace std;
using ull = unsigned long long;
using ll = long long;
using ld = long double;
using D = double;
using ii = pair<int, int>;
using vi = vector<int>;
using vii = vector<ii>;
template <typename T>
T sqr(T a) {
  return a * a;
}
template <typename T>
T gcd(T a, T b) {
  return b ? gcd(b, a % b) : a;
}
template <typename T>
T sgn(T a) {
  return a > 0 ? 1 : (a < 0 ? -1 : 0);
}
template <typename T>
T abs(T a) {
  return a > 0 ? a : -a;
}
const int inf = 2e9;
const ld st = 0.000001;
const ld pi = acos((ld)-1);
int n;
int m;
int a[2];
string s;
int main() {
  cin >> n >> a[0] >> a[1];
  cin >> s;
  int j = 0;
  int ans = 0;
  if (a[0] < a[1]) swap(a[0], a[1]);
  for (int i = 0; i < n; i++) {
    if (s[i] == '*') {
      if (a[0] < a[1]) swap(a[0], a[1]);
      j = 0;
    } else {
      if (a[j] == 0) {
        j ^= 1;
        continue;
      }
      a[j]--;
      j ^= 1;
      ans++;
    }
  }
  cout << ans;
  return 0;
}
