#include <bits/stdc++.h>
using namespace std;
int N, a, b;
string s1;
bool f[200005];
int main() {
  ios::sync_with_stdio(0);
  cin >> N >> a >> b;
  cin >> s1;
  for (int i = 0; i < s1.length(); i++) {
    if (s1[i] == '*') f[i + 1] = 1;
  }
  bool f1 = 1;
  bool x = 1;
  int ans = 0;
  for (int i = 1; i <= N; i++) {
    if (a == 0 && b == 0) {
      cout << ans;
      return 0;
    }
    if (f[i] == 1) {
      f1 = 1;
      continue;
    }
    if (f1 && f[i] == 0) {
      f1 = 0;
      if (a > b) {
        x = 0;
        a--;
        ans++;
      } else {
        x = 1;
        b--;
        ans++;
      }
    } else {
      if (x == 0) {
        if (b) b--, ans++;
        x = !x;
      } else {
        if (a) a--, ans++;
        x = !x;
      }
    }
  }
  cout << ans;
  return 0;
}
