#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, a, b, cnt = 0;
  cin >> n >> a >> b;
  char A[n];
  int sum = a + b;
  for (long long i = 0; i < n; i++) cin >> A[i];
  if (a < b) swap(a, b);
  for (long long i = 0; i < n; i++) {
    if (A[i] == '.') {
      if (cnt % 2 == 0)
        a--;
      else
        b--;
      cnt++;
    } else {
      if (a < b) swap(a, b);
      cnt = 0;
    }
  }
  cout << sum - max(a, 0) - max(b, 0) << '\n';
}
signed main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t;
  t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
