#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  std::vector<pair<char, long long> > v;
  v.push_back({s[0], 1});
  for (long long i = 1; i < s.size(); i++) {
    if (s[i] == s[i - 1]) {
      v[v.size() - 1].second++;
    } else
      v.push_back({s[i], 1});
  }
  long long start = 0;
  long long init = a + b;
  for (long long i = 0; i < v.size(); i++) {
    if (v[i].first == '*') {
      start += v[i].second;
      continue;
    }
    if (v[i].second == 1) {
      if (a < b && b > 0)
        b--;
      else if (a > 0)
        a--;
    } else {
      long long len = v[i].second;
      if (len % 2 == 0) {
        long long x = len / 2;
        if (a < b) {
          b = max(0ll, b - x);
          a = max(0ll, a - x);
        } else {
          b = max(0ll, b - x);
          a = max(0ll, a - x);
        }
      } else {
        long long x = len / 2;
        long long y = x + 1;
        if (a < b) {
          b = max(0ll, b - y);
          a = max(0ll, a - x);
        } else {
          b = max(0ll, b - x);
          a = max(0ll, a - y);
        }
      }
    }
  }
  cout << init - a - b << "\n";
}
