#include <bits/stdc++.h>
#pragma GCC target("avx2")
#pragma GCC optimization("O3")
#pragma GCC optimization("unroll-loops")
using namespace std;
const long long MOD = 998244353;
const long long maxn = 1e5 + 1;
long long a, b, c, d, e, k, n, m, s, x, y, ans;
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> m >> k;
  vector<long long> A(n);
  for (auto &a : A) cin >> a;
  long long washed = 0;
  for (long long i = 0; i < n; i++) {
    if (A[i] == 1 and m > 0)
      m--;
    else if (A[i] == 1 and m == 0)
      washed++;
    else if (A[i] == 2 and k > 0)
      k--;
    else if (A[i] == 2 and m > 0)
      m--;
    else if (A[i] == 2 and m == 0 and k == 0)
      washed++;
  }
  cout << washed;
  return 0;
}
