#include <bits/stdc++.h>
using namespace std;
void solve() {
  int n, a, b;
  string s;
  cin >> n >> a >> b >> s;
  int i = 0, ans = 0;
  while (i < n) {
    if (a < b) swap(a, b);
    if (s[i] == '*')
      i++;
    else {
      for (; s[i] == '.'; i++, swap(a, b)) a > 0 ? a--, ans++ : 0;
    }
  }
  cout << ans;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long int t = 1;
  while (t--) {
    solve();
    cout << "\n";
    cerr << "'\\n'"
         << " " << '\n'
         << "\n";
  }
}
