#include <bits/stdc++.h>
using namespace std;
int main() {
  vector<int> e, ne;
  int n, a, b, ans = 0;
  cin >> n >> a >> b;
  int am = 0;
  for (int i = 0; i < n; i++) {
    char t;
    cin >> t;
    if (t == '.')
      am++;
    else if (am > 0) {
      if (am % 2 == 0)
        e.push_back(am);
      else
        ne.push_back(am);
      am = 0;
    }
  }
  if (am > 0) {
    if (am % 2 == 0)
      e.push_back(am);
    else
      ne.push_back(am);
  }
  sort(ne.begin(), ne.end());
  int indexe = 0, indexne = 0;
  for (; indexe < e.size(); indexe++) {
    if (a <= e[indexe] / 2) {
      ans += a;
      a = 0;
    } else {
      ans += e[indexe] / 2;
      a -= e[indexe] / 2;
    }
    if (b <= e[indexe] / 2) {
      ans += b;
      b = 0;
    } else {
      ans += e[indexe] / 2;
      b -= e[indexe] / 2;
    }
    if (a == 0 && b == 0) {
      cout << ans << endl;
      return 0;
    }
  }
  for (; indexne < ne.size(); indexne++) {
    if (a >= b) {
      if (b <= ne[indexne] / 2) {
        ans += b;
        b = 0;
      } else {
        ans += ne[indexne] / 2;
        b -= ne[indexne] / 2;
      }
      if (a <= ne[indexne] / 2 + 1) {
        ans += a;
        a = 0;
      } else {
        ans += ne[indexne] / 2 + 1;
        a -= ne[indexne] / 2 + 1;
      }
    } else {
      if (a <= ne[indexne] / 2) {
        ans += a;
        a = 0;
      } else {
        ans += ne[indexne] / 2;
        a -= ne[indexne] / 2;
      }
      if (b <= ne[indexne] / 2 + 1) {
        ans += b;
        b = 0;
      } else {
        ans += ne[indexne] / 2 + 1;
        b -= ne[indexne] / 2 + 1;
      }
    }
    if (a == 0 && b == 0) break;
  }
  cout << ans << endl;
}
