#include <bits/stdc++.h>
int main() {
  int n, m, k, t = 0, o = 0, x, i, ans = 0, left, lb;
  scanf("%d %d %d", &n, &m, &k);
  for (i = 0; i < n; i++) {
    scanf("%d", &x);
    if (x == 1)
      o++;
    else
      t++;
  }
  lb = m - o;
  if (lb >= 0)
    left = k + lb;
  else {
    ans = -(lb);
    left = k;
  }
  if ((t - left) >= 0) ans = ans + (t - left);
  printf("%d\n", ans);
  return 0;
}
