#include <bits/stdc++.h>
using namespace std;
void lucifer() {
  long long int n, m, k, i, c = 0;
  cin >> n >> m >> k;
  long long int a[n];
  for (i = 0; i < n; i++) {
    cin >> a[i];
  }
  for (i = 0; i < n; i++) {
    if (a[i] == 1 && m != 0)
      m--;
    else if (a[i] == 2 && (k != 0 || m != 0)) {
      if (k != 0)
        k--;
      else if (m != 0)
        m--;
    } else if (m == 0) {
      c++;
    }
  }
  cout << c;
}
signed main() {
  long long int test = 1;
  while (test--) lucifer();
}
