#include <bits/stdc++.h>
const double eps = (1e-5);
using namespace std;
int dcmp(long double a, long double b) {
  return fabsl(a - b) <= eps ? 0 : (a > b) ? 1 : -1;
}
long long getBit(long long num, int idx) { return ((num >> idx) & 1ll) == 1; }
int setBit1(int num, int idx) { return num | (1 << idx); }
long long setBit0(long long num, int idx) { return num & ~(1ll << idx); }
long long flipBit(long long num, int idx) { return num ^ (1ll << idx); }
void M() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
int countNumBit1(int mask) {
  int ret = 0;
  while (mask) {
    mask &= (mask - 1);
    ++ret;
  }
  return ret;
}
int a, b, n, mem[200009][5], arr[200009];
string s;
int main() {
  cin >> n >> a >> b >> s;
  for (int i = 0; i < n; i++) {
    if (s[i] == '.')
      arr[i] = 0;
    else
      arr[i] = 1;
  }
  int cnt = 0;
  for (int i = 0; i < n; i++) {
    if (a == 0 && b == 0) break;
    if (arr[i] == 1) continue;
    if (i == 0) {
      if (a > b) {
        a--;
        cnt++;
        arr[i] = 2;
      } else if (b >= a) {
        b--;
        cnt++;
        arr[i] = 3;
      }
    } else {
      if (arr[i - 1] == 2 && b) {
        b--;
        cnt++;
        arr[i] = 3;
      } else if (arr[i - 1] == 3 && a) {
        a--;
        cnt++;
        arr[i] = 2;
      } else if (arr[i - 1] != 2 && arr[i - 1] != 3) {
        if (a > b) {
          a--;
          cnt++;
          arr[i] = 2;
        } else if (b >= a) {
          b--;
          cnt++;
          arr[i] = 3;
        }
      }
    }
  }
  cout << cnt << endl;
}
