#include <bits/stdc++.h>
using namespace std;
int main(int argc, const char* argv[]) {
  int count1 = 0, count2 = 0, temp, final = 0;
  int n, k, m;
  cin >> n >> k >> m;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    if (temp == 1)
      count1++;
    else
      count2++;
  }
  if ((count1 - k) > 0) final = (count1 - k);
  k = k - count1;
  if ((count2 - m) > 0) {
    if (k > 0) m = m + k;
    if ((count2 - m) > 0) final = final + (count2 - m);
  }
  cout << final;
  return 0;
}
