#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, c = 0, s = 0, res, i;
  cin >> n >> a >> b;
  string str;
  cin >> str;
  for (i = 0; str[i]; i++) {
    if (str[i] == '.') c++;
    if ((str[i] == '*' || !str[i + 1]) && c > 0) {
      res = c / 2;
      if (c % 2 == 0) {
        if (a >= res && b >= res) {
          a -= res;
          b -= res;
          s += c;
        } else {
          if (a >= res) {
            a -= res;
            s += (res + b);
            b = 0;
          } else if (b >= res) {
            b -= res;
            s += (res + a);
            a = 0;
          } else if (a < res && b < res) {
            s += (a + b);
            a = 0;
            b = 0;
          }
        }
      } else {
        if (a > b) {
          if (a >= res + 1) {
            s += (res + 1);
            a -= (res + 1);
          } else {
            s += a;
            a = 0;
          }
          if (b >= res) {
            s += res;
            b -= res;
          } else {
            s += b;
            b = 0;
          }
        } else {
          if (b >= res + 1) {
            s += (res + 1);
            b -= (res + 1);
          } else {
            s += b;
            b = 0;
          }
          if (a >= res) {
            s += res;
            a -= res;
          } else {
            s += a;
            a = 0;
          }
        }
      }
      c = 0;
    }
  }
  cout << s;
}
