#include <bits/stdc++.h>
int n, a, b;
std::string seat;
int main() {
  std::cin >> n >> a >> b >> seat;
  int tot = 0, cnt = 0;
  while (a + b > 0) {
    if (seat[cnt] == '*') {
      cnt++;
      if (cnt == n) break;
      continue;
    } else if (seat[cnt] == '.') {
      if (cnt == 0) {
        if (a >= b) {
          if (a > 0) {
            seat[cnt] = 'p';
            a--;
            tot++;
          }
        } else {
          if (b > 0) {
            seat[cnt] = 'a';
            b--;
            tot++;
          }
        }
      } else if (seat[cnt - 1] == 'a' && a > 0) {
        seat[cnt] = 'p';
        a--;
        tot++;
      } else if (seat[cnt - 1] == 'p' && b > 0) {
        seat[cnt] = 'a';
        b--;
        tot++;
      } else if (seat[cnt - 1] == '*' || seat[cnt - 1] == '.') {
        if (a >= b && a > 0) {
          seat[cnt] = 'p';
          a--;
          tot++;
        } else if (b > 0) {
          seat[cnt] = 'a';
          b--;
          tot++;
        } else {
          cnt++;
          if (cnt == n) break;
          continue;
        }
      }
    }
    cnt++;
    if (cnt == n) break;
  }
  std::cout << tot;
  return 0;
}
