#include <bits/stdc++.h>
using namespace std;
int n, m, a, b, d, ans;
string s;
int main() {
  cin >> n >> a >> b >> s;
  for (char& c : s)
    if (c == '*') c = ' ';
  stringstream ss(s);
  while (ss >> s) {
    m = s.size();
    if (m & 1) {
      if (a < b) swap(a, b);
      d = min(a, (m + 1) / 2);
      ans += d;
      a -= d;
      d = min(b, m / 2);
      ans += d;
      b -= d;
    } else {
      d = min(a, m / 2);
      ans += d;
      a -= d;
      d = min(b, m / 2);
      ans += d;
      b -= d;
    }
  }
  cout << ans << endl;
  ans += d;
  b -= d;
  ans += d;
  b -= d;
  ans += d;
  b -= d;
  return 0;
}
