#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T poww(T b, T p) {
  long long a = 1;
  while (p) {
    if (p & 1) {
      a = (a * b);
    }
    p >>= 1;
    b = (b * b);
  }
  return a;
}
template <class T>
inline T modpoww(T b, T p, T mmod) {
  long long a = 1;
  while (p) {
    if (p & 1) {
      a = (a * b) % mmod;
    }
    p >>= 1;
    b = (b * b) % mmod;
  }
  return a % mmod;
}
template <class T>
inline T gcd(T a, T b) {
  if (b > a) return gcd(b, a);
  return ((b == 0) ? a : gcd(b, a % b));
}
template <class T>
inline void scan(vector<T>& a, int n) {
  T b;
  int i;
  for ((i) = 0; (i) < (n); (i) += 1) {
    cin >> b;
    a.push_back(b);
  }
}
inline void scand(vector<int>& a, int n) {
  int b;
  int i;
  for ((i) = 0; (i) < (n); (i) += 1) {
    scanf("%d", &(b));
    a.push_back(b);
  }
}
inline void scanlld(vector<long long>& a, int n) {
  long long b;
  int i;
  for ((i) = 0; (i) < (n); (i) += 1) {
    scanf("%lld", &(b));
    a.push_back(b);
  }
}
int main() {
  int i, j, k, n, m, l, h, c1 = 0, c2 = 0, ans = 0;
  cin >> n >> m >> k;
  for ((i) = 0; (i) < (n); (i) += 1) {
    scanf("%d", &(h));
    if (h == 1)
      c1++;
    else
      c2++;
  }
  m -= c1;
  if (m < 0) {
    ans += (m * -1);
    k -= c2;
    if (k < 0) {
      k *= -1;
      ans += k;
    }
    cout << ans << "\n";
    return 0;
  }
  k -= c2;
  k += m;
  if (k < 0)
    cout << k * -1 << "\n";
  else
    cout << "0\n";
}
