#include <bits/stdc++.h>
using namespace std;
const int N = 200010;
const int mod = (int)1e9 + 7;
vector<int> v;
long long ans;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, a, b, x;
  string s;
  cin >> n >> a >> b >> s;
  int last = -1;
  for (int i = 0; i < n; i++)
    if (s[i] == '*') {
      v.push_back(i - last - 1);
      last = i;
    }
  v.push_back(n - last - 1);
  sort(v.begin(), v.end());
  reverse(v.begin(), v.end());
  for (auto j : v) {
    if (!j) break;
    if (a < b) swap(a, b);
    x = (j + 1) / 2;
    ans += min(x, a);
    a -= min(x, a);
    x = j - x;
    ans += min(x, b);
    b -= min(x, b);
  }
  cout << ans;
  return 0;
}
