#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  int n, a, b, c = 0, t = 0;
  string s;
  cin >> n >> a >> b >> s;
  int i, rem = 0;
  for (i = 0; i < n; ++i) {
    if (s[i] == '.') c++;
    if (s[i] == '*' || i == n - 1) {
      if (c % 2 != 0) rem += 1;
      int m = c / 2;
      if (a >= m) {
        t += m;
        a -= m;
      } else {
        t += a;
        a = 0;
      }
      if (b >= m) {
        t += m;
        b -= m;
      } else {
        t += b;
        b = 0;
      }
      c = 0;
    }
  }
  int z = a + b;
  if (z >= rem)
    t += rem;
  else
    t += z;
  cout << t;
  return 0;
}
