#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b;
  while (cin >> n >> a >> b) {
    string str;
    int i, j, k, l, m;
    cin >> str;
    l = str.length();
    int mi, mx;
    mi = min(a, b);
    mx = max(a, b);
    int cnt = 0;
    int tr = 0;
    for (i = 0; i < l; i++) {
      if (str[i] == '.') {
        if (tr != 0 && tr % 2 == 1) {
          if (mi > 0) {
            cnt++;
            tr++;
            mi--;
          } else
            tr++;
        } else {
          if (mx > 0) {
            cnt++;
            tr++;
            mx--;
          }
        }
      } else {
        a = mx;
        b = mi;
        mx = max(a, b);
        mi = min(a, b);
        tr = 0;
      }
    }
    cout << cnt << endl;
  }
  return 0;
}
