#include <bits/stdc++.h>
using namespace std;
int const N = 312312;
int const INF = 1e9 + 7;
int n, type1 = 0, type2 = 0, a[N], c, as;
int main() {
  cin >> n >> type1 >> type2;
  for (int c = 1; c <= n; c++) {
    cin >> a[c];
  }
  for (int c = 1; c <= n; c++) {
    if (a[c] == 1) {
      if (type1 < 1) {
        as++;
      } else
        type1--;
    } else {
      if (!type1 && !type2) {
        as++;
      } else {
        if (type2)
          type2--;
        else
          type1--;
      }
    }
  }
  cout << as << endl;
  return 0;
}
