#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e9 + 7;
const int N = 2e5 + 10;
int main() {
  int n, a, b;
  cin >> n >> a >> b;
  string str;
  cin >> str;
  str += '*';
  int cnt = 0;
  int ans = 0;
  for (auto &c : str) {
    if (c == '.')
      cnt++;
    else {
      if (a < b) swap(a, b);
      while (cnt--) {
        if (a-- > 0) ans++;
        swap(a, b);
      }
      cnt = 0;
    }
  }
  cout << ans << endl;
  return 0;
}
