#include <bits/stdc++.h>
using namespace std;
int n, a, b;
char c[200007];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cin >> n >> a >> b;
  for (int i = 1; i <= n; ++i) cin >> c[i];
  int i = 1, res = a + b, dem = 0;
  while (i <= n) {
    while (c[i] == '.') dem++, i++;
    if (a < b)
      a -= dem / 2, b -= dem / 2 + (dem % 2 == 1);
    else
      a -= dem / 2 + (dem % 2 == 1), b -= dem / 2;
    if (c[i] == '*') dem = 0, i++;
  }
  if (a < 0) a = 0;
  if (b < 0) b = 0;
  cout << res - (a + b);
  return 0;
}
