#include <bits/stdc++.h>
using namespace std;
long long mod = 1;
int n, m, x, y, u, v;
string s;
int main() {
  int i, j, t, tc = 1, a, b;
  cin >> n >> a >> b;
  cin >> s;
  int l = s.length();
  bool aa = 0, bb = 0, st = 0;
  int cnt = 0;
  for (i = 0; i < l; i++) {
    if (s[i] == '*') {
      aa = 0;
      bb = 0;
      st = 1;
    } else {
      if (st) {
        if (a > b) {
          aa = 1;
          bb = 0;
          a--;
          st = 0;
          cnt++;
        } else if (a < b) {
          bb = 1;
          aa = 0;
          b--;
          st = 0;
          cnt++;
        } else if (a == b && a > 0) {
          aa = 1;
          bb = 0;
          a--;
          st = 0;
          cnt++;
        } else {
          aa = 0;
          bb = 0;
          st = 1;
        }
      } else if (!st && !aa && !bb) {
        if (a > b) {
          aa = 1;
          bb = 0;
          a--;
          st = 0;
          cnt++;
        } else if (a < b) {
          bb = 1;
          aa = 0;
          b--;
          st = 0;
          cnt++;
        } else if (a == b && a > 0) {
          aa = 1;
          bb = 0;
          a--;
          st = 0;
          cnt++;
        } else {
          aa = 0;
          bb = 0;
          st = 1;
        }
      } else {
        if (aa && b > 0) {
          bb = 1;
          aa = 0;
          b--;
          st = 0;
          cnt++;
        } else if (bb && a > 0) {
          aa = 1;
          bb = 0;
          a--;
          st = 0;
          cnt++;
        } else {
          aa = 0;
          bb = 0;
          st = 1;
        }
      }
    }
  }
  cout << cnt << endl;
  return 0;
}
