#include <bits/stdc++.h>
using namespace std;
bool test = 0;
void solve() {
  int n, b, p;
  cin >> n >> b >> p;
  int one = 0;
  int two = 0;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int tmp;
    cin >> tmp;
    if ((b == 0 && p == 0)) {
      ans++;
      continue;
    }
    if (tmp == 1 || p == 0) {
      if (tmp == 1 && b == 0)
        ans++;
      else
        b--;
    } else {
      p--;
    }
  }
  cout << ans;
}
int main() {
  ios::sync_with_stdio(0);
  cout.tie(0);
  cin.tie(0);
  if (test) {
    int t;
    cin >> t;
    while (t--) solve();
  } else
    solve();
  return 0;
}
