#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, c, b;
  cin >> n >> c >> b;
  string s;
  cin >> s;
  int a[2];
  a[0] = max(c, b);
  a[1] = min(c, b);
  int who = 0;
  int ans = 0;
  if (s[0] == '.') {
    ++ans;
    s[0] = char(who + '0');
    --a[who];
    who ^= 1;
  }
  for (int i = 1; i < (int)s.size(); i++) {
    if (s[i] == '.' and (s[i - 1] - '0') != who and a[who]) {
      ++ans;
      a[who]--;
      s[i] = char(who + '0');
    }
    if (s[i] != '*' || (s[i] == '*' && a[who] < a[who ^ 1])) who ^= 1;
  }
  cout << ans;
  return 0;
}
