#include <bits/stdc++.h>
#pragma comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
long long int mod = 1e9 + 7;
long long int power(long long int a, long long int b) {
  if (b == 0)
    return 1;
  else if (b % 2 == 0)
    return power(a * a % mod, b / 2) % mod;
  else
    return (a % mod * power(a * a % mod, b / 2)) % mod;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, a, b;
  cin >> n >> a >> b;
  string s;
  cin >> s;
  for (int i = 0; i < n; ++i) {
    if (s[i] == '*') continue;
    if (a == 0 && b == 0) continue;
    if (i == 0) {
      if (a == 0 && b != 0) {
        s[i] = 'b';
        b--;
        continue;
      }
      if (b == 0 && a != 0) {
        s[i] = 'a';
        a--;
        continue;
      }
      if (a >= b) {
        s[i] = 'a';
        a--;
        continue;
      } else {
        s[i] = 'b';
        b--;
        continue;
      }
    }
    if (s[i - 1] == '*') {
      if (a == 0 && b != 0) {
        s[i] = 'b';
        b--;
        continue;
      }
      if (b == 0 && a != 0) {
        s[i] = 'a';
        a--;
        continue;
      }
      if (a >= b) {
        s[i] = 'a';
        a--;
        continue;
      } else {
        s[i] = 'b';
        b--;
        continue;
      }
    }
    if (s[i - 1] == 'a') {
      if (b != 0) {
        s[i] = 'b';
        b--;
        continue;
      } else {
        continue;
      }
    }
    if (s[i - 1] == 'b') {
      if (a != 0) {
        s[i] = 'a';
        a--;
        continue;
      } else {
        continue;
      }
    }
    if (s[i - 1] == '.') {
      if (a == 0 && b != 0) {
        s[i] = 'b';
        b--;
        continue;
      }
      if (b == 0 && a != 0) {
        s[i] = 'a';
        a--;
        continue;
      }
      if (a >= b) {
        s[i] = 'a';
        a--;
        continue;
      } else {
        s[i] = 'b';
        b--;
        continue;
      }
    }
  }
  int count = 0;
  for (int i = 0; i < n; ++i)
    if (s[i] == 'a' || s[i] == 'b') count++;
  cout << count;
  return 0;
}
