#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, a, b, ans = 0;
  string s;
  cin >> n >> a >> b >> s;
  if (b > a) swap(a, b);
  int pred = -1;
  for (char c : s) {
    if (c == '*') {
      pred = -1;
      if (b > a) swap(a, b);
    } else if (pred == 1) {
      if (b > 0) {
        b--;
        ans++;
        pred = 0;
      } else
        pred = -1;
    } else if (pred == 0) {
      if (a > 0) {
        a--;
        ans++;
        pred = 1;
      } else
        pred = -1;
    } else {
      if (a == 0) break;
      a--;
      ans++;
      pred = 1;
    }
  }
  cout << ans;
  return 0;
}
