#include <bits/stdc++.h>
using namespace std;
int arr[1001];
int main() {
  int n, m, k, one = 0, second = 0;
  cin >> n >> m >> k;
  for (int i = 1; i <= n; i++) {
    cin >> arr[i];
    if (arr[i] == 1)
      one++;
    else
      second++;
  }
  int ans = 0;
  if (second > k) {
    ans = max(ans, -1 * (m - one - (second - k)));
  } else
    ans = max(ans, -1 * (m - one));
  cout << ans << '\n';
}
