#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
long long powmod(long long a, long long b) {
  long long res = 1;
  a %= mod;
  assert(b >= 0);
  for (; b; b >>= 1) {
    if (b & 1) res = res * a % mod;
    a = a * a % mod;
  }
  return res;
}
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
double lg(double a) { return (log(a) / log(10.0)); }
const long long N = 222222;
char s[N];
bool ok = false;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, a, b;
  cin >> n >> a >> b;
  cin >> s;
  long long cnt = 0;
  for (int i = 0; i <= n - 1; i++) {
    if (a < b) swap(a, b);
    while (s[i] == '.' && i < n) {
      cnt += (a > 0);
      a--;
      swap(a, b);
      i++;
    }
  }
  cout << cnt << endl;
}
