#include <bits/stdc++.h>
using namespace std;
const int maxn = 2e5 + 5;
const int Mod = 1000000007;
const int INF = 0x3f3f3f3f;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const double e = 2.718281828459045235360287471352662;
const double PI = acos(-1);
const double ERR = 1e-10;
char str[maxn];
int n, a, b;
int main() {
  ios::sync_with_stdio(false);
  int ans = 0;
  cin >> n >> a >> b;
  cin >> str;
  for (int i = 0; i < n; i++) {
    if (str[i] == '.') {
      if (i == 0 || str[i - 1] == '*' || str[i - 1] == '.') {
        if (a > b) {
          a--;
          ans++;
          str[i] = 'a';
        } else {
          b--;
          ans++;
          str[i] = 'b';
        }
      } else {
        if (str[i - 1] == 'a') {
          if (b == 0)
            continue;
          else {
            b--;
            str[i] = 'b';
            ans++;
          }
        } else {
          if (a == 0) {
            continue;
          } else {
            a--;
            ans++;
            str[i] = 'a';
          }
        }
      }
    }
    if (a == 0 && b == 0) break;
  }
  cout << ans << endl;
  return 0;
}
