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