#include <bits/stdc++.h>
using namespace std;
template <class T>
istream& operator>>(istream& is, vector<T>& v) {
  for (T& x : v) is >> x;
  return is;
}
const int dr[]{-1, -1, 0, 1, 1, 1, 0, -1};
const int dc[]{0, 1, 1, 1, 0, -1, -1, -1};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  long long n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  long long k = 0, f = 0, se = 0, ans = 0;
  for (long long i = 0; i < n; ++i) {
    if (s[i] == '.') {
      se++;
    } else {
      k += se % 2;
      f += se / 2;
      se = 0;
    }
  }
  k += se % 2;
  f += se / 2;
  ans += a - max(1ll * 0, a - f);
  a = max(1ll * 0, a - f);
  ans += b - max(1ll * 0, b - f);
  b = max(1ll * 0, b - f);
  ans += (a + b) - max(1ll * 0, a + b - k);
  cout << ans << endl;
  return 0;
}
