#include <bits/stdc++.h>
int main() {
  int a[1001], i, h, t = 0, n, m, k, r = 0, s = 0, s1 = 0, q = 0, c, p;
  scanf("%d %d %d", &n, &m, &k);
  for (i = 0; i < n; i++) {
    scanf("%d", &a[i]);
  }
  c = 0;
  p = 0;
  for (i = 0; i < n; i++) {
    if (a[i] == 1)
      c++;
    else
      p++;
  }
  if (m >= c) {
    t = 0;
    q = m - c;
  }
  if (c > m) r = c - m;
  if (p > (k + q)) s = p - (k + q);
  if (k + q >= p) s1 = 0;
  h = t + r + s + s1;
  printf("%d\n", h);
  return 0;
}
