#include <bits/stdc++.h>
using namespace std;
int main() {
  int dishes, bowls, firstType = 0, secondType = 0, temp, n;
  cin >> n >> bowls >> dishes;
  for (int i = 0; i < n; i++) {
    cin >> temp;
    if (temp == 1)
      firstType++;
    else
      secondType++;
  }
  bowls -= firstType;
  temp = 0;
  if (bowls < 0) {
    temp += abs(bowls);
    bowls = 0;
  }
  if (secondType > (dishes + bowls)) {
    temp += secondType - (dishes + bowls);
  }
  cout << temp;
  return 0;
}
