#include <bits/stdc++.h>
const int INF = 2147483647;
const int MOD = 1000000007;
const long long INF64 = 9223372036854775807;
const long double EPS = 1e-7;
using namespace std;
int main() {
  int n, m, k, t;
  scanf("%d%d%d", &n, &m, &k);
  int a[n], cnt1 = 0, cnt2 = 0, ans = 0;
  for (int i = 0; i < n; i++) {
    scanf("%d", &t);
    if (t == 1) {
      cnt1++;
      if (cnt1 > m) ans++;
    } else if (cnt2 < k) {
      cnt2++;
      if (cnt2 > k) ans++;
    } else {
      cnt1++;
      if (cnt1 > m) ans++;
    }
  }
  printf("%d\n", ans);
  return 0;
}
