#include <bits/stdc++.h>
using namespace std;
const int N = 1e5 + 5;
const int mod = 1e9 + 7;
void show2d(const vector<vector<int>>& adj) {
  for (auto x : adj) {
    for (auto y : x) {
      cout << y << " ";
    }
    cout << "\n";
  }
}
long long int modexp(long long int a, long long int b, long long int mod) {
  long long int x = 1;
  while (b) {
    if (b & 1) x = ((x % mod) * (a % mod)) % mod;
    a = ((a % mod) * (a % mod)) % mod;
    b = b / 2;
  }
  return x;
}
void rf() {}
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  int n, m, k;
  cin >> n >> m >> k;
  int o = 0;
  int tt = 0;
  for (int i = 0; i < n; ++i) {
    int ch;
    cin >> ch;
    if (ch == 1)
      ++o;
    else
      ++tt;
  }
  tt = max(tt - k, 0);
  cout << max((o + tt) - m, 0) << "\n";
}
