#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, b, p;
  int tmp;
  int rs = 0;
  cin >> n >> b >> p;
  int f = 0, s = 0;
  for (int i = 1; i <= n; i++) {
    cin >> tmp;
    if (tmp == 1)
      f++;
    else
      s++;
  }
  if (b > f) {
    if (b - f + p < s) rs += (s - (b - f + p));
  } else {
    rs += (f - b);
    if (p < s) rs += (s - p);
  }
  cout << rs;
}
