#include <bits/stdc++.h>
using namespace std;
int a[1010];
int main() {
  int n, m, k;
  int i, j, min;
  int n1, n2;
  while (scanf("%d %d %d", &n, &m, &k) != EOF) {
    min = 0;
    n1 = n2 = 0;
    for (i = 0; i < n; i++) {
      scanf("%d", &a[i]);
      if (a[i] == 1)
        n1++;
      else
        n2++;
    }
    if (m >= n1) {
      if (m - n1 + k >= n2)
        min = 0;
      else
        min = n2 - (m - n1 + k);
    } else {
      min += n1 - m;
      if (k < n2) min += n2 - k;
    }
    printf("%d\n", min);
  }
  return 0;
}
