#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, a, b;
  cin >> n >> a >> b;
  vector<char> v(n);
  for (size_t i = 0; i < n; i++) {
    cin >> v[i];
  }
  int last = 0;
  int ans = 0;
  for (size_t i = 0; i < n; i++) {
    if (v[i] == '.') {
      if (last == 0) {
        last = max(a, b);
        if (a > b) {
          if (a)
            a--, last = -1, ans++;
          else
            last = 0;
        } else if (b)
          b--, last = 1, ans++;
        else
          last = 0;
      } else {
        if (last == 1) {
          if (a)
            a--, last = -1, ans++;
          else
            last = 0;
        } else if (b)
          b--, last = 1, ans++;
        else
          last = 0;
      }
    } else {
      last = 0;
    }
  }
  cout << ans;
}
