#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  vector<int> v;
  string s;
  cin >> s;
  int cur = 0;
  for (char c : s) {
    if (c == '*') {
      if (cur) v.push_back(cur);
      cur = 0;
    } else
      cur++;
  }
  if (cur) v.push_back(cur);
  int ans = 0;
  for (int i : v) {
    if (a < b) swap(a, b);
    int x = min(a, (i + 1) / 2), y = min(b, i / 2);
    a -= x;
    b -= y;
    ans += x + y;
  }
  cout << ans << "\n";
  return 0;
}
