#include <bits/stdc++.h>
using namespace std;
void solve() {
  long long int n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  long long int c = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == '*') c++;
  }
  if (c == n) {
    cout << 0 << endl;
    return;
  }
  vector<long long int> v;
  c = 0;
  for (long long int i = 0; i < n; i++) {
    if (s[i] == '.')
      c++;
    else {
      v.push_back(c);
      c = 0;
    }
  }
  if (c > 0) v.push_back(c);
  long long int ans = 0, sum = 0, cnt = 0, res = 0;
  for (long long int i = 0; i < v.size(); i++) {
    sum += v[i] / 2;
    if (v[i] % 2) cnt++;
  }
  if (a >= sum) {
    ans += sum;
    res += a - sum;
  } else {
    ans += a;
    res += 0;
  }
  if (b >= sum) {
    ans += sum;
    res += b - sum;
  } else {
    ans += b;
    res += 0;
  }
  if (res >= cnt)
    ans += cnt;
  else
    ans += res;
  cout << ans << endl;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long int test = 1;
  while (test--) {
    solve();
  }
  return 0;
}
