#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, m, k, a, i, b[1001], c[1001], cb = 0, c1 = 0, temp;
  cin >> n >> m >> k;
  for (i = 0; i < n; i++) {
    cin >> a;
    if (a == 1)
      cb++;
    else
      c1++;
  }
  if (m >= cb) {
    temp = m + k;
    if (temp >= n)
      cout << "0";
    else {
      temp = n - temp;
      cout << temp;
    }
  } else {
    cb = cb - m;
    if (c1 >= k) cb = cb + c1 - k;
    cout << cb;
  }
  cout << endl;
  return 0;
}
