#include <bits/stdc++.h>
int a, bowl, plate, n, i, ans, dirtyp, arr[3], dirtyb;
int main() {
  scanf("%d %d %d", &n, &bowl, &plate);
  for (i = 1; i <= n; i++) {
    scanf("%d", &a);
    arr[a]++;
  }
  if (arr[1] <= bowl)
    bowl -= arr[1], arr[1] = 0;
  else
    arr[1] -= bowl, bowl = 0;
  if (arr[2] <= plate)
    plate -= arr[2], arr[2] = 0;
  else
    arr[2] -= plate, plate = 0;
  if (bowl) arr[2] -= bowl, bowl = 0;
  if (arr[1] + arr[2] < 0)
    puts("0");
  else
    printf("%d", arr[1] + arr[2]);
  return 0;
}
