#include <bits/stdc++.h>
using namespace std;
int n, a, b;
char arr[200005];
int _max(int a, int b) { return (a > b) ? a : b; }
int main() {
  cin >> n >> a >> b >> arr;
  int ret = 0;
  int cnt = 0;
  bool flag = false;
  for (int i = 0; i < n; ++i) {
    if (arr[i] == '.') {
      ++cnt;
      if (i == n - 1 && !flag) {
        --i, flag = true;
        arr[n - 1] = '*';
      }
    } else {
      int mid = cnt / 2;
      if (cnt % 2 == 1) ++mid;
      if (a > b) {
        if (mid <= a) {
          a -= mid, ret += mid;
          cnt -= mid;
        } else {
          ret += a;
          cnt -= a;
          a = 0;
        }
        if (cnt <= b) {
          b -= cnt, ret += cnt;
        } else
          ret += b, b = 0;
      } else {
        if (mid <= b) {
          b -= mid, ret += mid;
          cnt -= mid;
        } else {
          ret += b;
          cnt -= b;
          b = 0;
        }
        if (cnt <= a) {
          a -= cnt, ret += cnt;
        } else {
          ret += a;
          a = 0;
        }
      }
      cnt = 0;
    }
  }
  cout << ret;
}
