#include <bits/stdc++.h>
using namespace std;
int x[1400];
int main() {
  int n, a, b, z = 0, c = 0;
  cin >> n >> a >> b;
  for (int i = 0; i < n; i++) {
    cin >> x[i];
    if (x[i] == 1)
      z++;
    else
      c++;
  }
  int need = 0, left = 0;
  if (a < z)
    need += z - a;
  else
    left += max(a - z, 0);
  need += max(c - b - left, 0);
  cout << max(need, 0) << endl;
  return 0;
}
