#include <bits/stdc++.h>
#pragma GCC optimize("Ofast,no-stack-protector,unroll-loops,fast-math,O3")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
void err(istream_iterator<string> it) { cout << '\n'; }
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cerr << "[" << *it << " = " << a << "] ";
  err(++it, args...);
}
pair<long long, long long> dx[] = {{1, 0}, {-1, 0}, {0, 1}, {0, -1}};
const long long inf = 2e9 + 7;
const long long INF = 3e18 + 7;
const long double pi = 3.1415926535897932384626433;
const long double EPS = 1e-9;
const long long mod = 1e9 + 7;
long long MOD = 1e15 + 7;
long long gcd(long long a, long long b) {
  if (a < b) swap(a, b);
  while (b) {
    a %= b;
    swap(a, b);
  }
  return a;
}
const bool multiple_tests = 0;
const long long N = 2e5 + 7;
void solve() {
  long long n;
  cin >> n;
  pair<long long, char> a, b;
  cin >> a.first >> b.first;
  a.second = '1';
  b.second = '2';
  if (a < b) {
    swap(a, b);
  }
  string s;
  cin >> s;
  bool turn = 1;
  long long ans = 0;
  for (long long i = 0; i < n; i++) {
    if (a < b) {
      swap(a, b);
    }
    if (s[i] == '.') {
      if (i && s[i - 1] == a.second && b.first > 0) {
        s[i] = b.second;
        b.first--;
        ans++;
      } else if (a.first > 0 && (i == 0 || (s[i - 1] != a.second))) {
        s[i] = a.second;
        a.first--;
        ans++;
      }
    } else {
      turn = 1;
    }
  }
  cout << ans;
}
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long TT = 1;
  if (multiple_tests) cin >> TT;
  for (long long T = 1; T <= TT; T++) {
    solve();
    cout << '\n';
  }
  cerr << "\nTime elapsed: " << 1.0 * clock() / CLOCKS_PER_SEC << " s.\n";
  return 0;
}
