#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << ": " << arg1 << endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << ": " << arg1 << " |";
  __f(comma + 1, args...);
}
const int INF = 1 << 29;
const int MOD = 1e9 + 7;
const int N = 2e5 + 10;
char s[N];
int main() {
  int n, a, b;
  scanf("%d%d%d", &n, &a, &b);
  scanf("%s", s);
  int ret = 0;
  for (int i = 0, j; i < n; i = j) {
    for (; i < n && s[i] == '*'; ++i)
      ;
    if (i == n) break;
    for (j = i + 1; j < n && s[j] == '.'; ++j)
      ;
    int len = j - i;
    if (a > b) swap(a, b);
    int t = min(a, len / 2);
    a -= t;
    ret += t;
    t = min(b, (len + 1) / 2);
    b -= t;
    ret += t;
  }
  printf("%d\n", ret);
  return 0;
}
