#include <bits/stdc++.h>
using namespace std;
const int N = 3228;
const int MOD = 1000 * 1000 * 1000 + 7;
long long pw(long long a, int first) {
  if (!first) return 1;
  if (first % 2) return a * pw(a * a, first / 2);
  return pw(a * a, first / 2);
}
void solve() {
  int pl[3] = {0};
  int n, p1, p2;
  cin >> n >> p1 >> p2;
  pl[1] -= p1;
  pl[2] -= p2;
  for (int i = 0; i < n; ++i) {
    int nxt;
    cin >> nxt;
    if (nxt == 2 && pl[2] >= 0)
      ++pl[1];
    else
      ++pl[nxt];
  }
  cout << max(0, pl[1]) + max(0, pl[2]);
}
int main() {
  double tt = clock();
  cout.tie(nullptr);
  cin.tie(nullptr);
  ios_base::sync_with_stdio(false);
  solve();
  return 0;
}
