#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  long long int n, bowl, plate, a;
  long long int reqd_bowl = 0, reqd = 0;
  cin >> n >> bowl >> plate;
  for (long long int i = 0; i < n; i++) {
    cin >> a;
    if (a == 1)
      reqd_bowl++;
    else
      reqd++;
  }
  long long int wash = 0;
  if (reqd_bowl >= bowl) {
    wash += reqd_bowl - bowl;
    bowl = 0;
  } else {
    bowl = bowl - reqd_bowl;
  }
  if (bowl + plate < reqd) wash += reqd - (bowl + plate);
  cout << wash;
}
