#include <bits/stdc++.h>
using namespace std;
int n, a, b, cnt, prv;
string s, ss;
int main() {
  cin >> n >> a >> b >> ss;
  s = "*" + ss + "*";
  int aa = a, bb = b;
  for (int i = 1; i <= n + 1; i++) {
    if (s[i] == '*') {
      int l = i - prv - 1;
      if (l % 2 == 0) {
        aa -= l / 2;
        bb -= l / 2;
      } else {
        if (aa >= bb) {
          aa -= l / 2 + 1;
          bb -= l / 2;
        } else {
          bb -= l / 2 + 1;
          aa -= l / 2;
        }
      }
      prv = i;
    }
  }
  cout << a - max(aa, 0) + b - max(bb, 0) << '\n';
}
