#include <bits/stdc++.h>
using namespace std;
int n, m, k;
int s1, s2, a;
int main() {
  while (cin >> n >> m >> k) {
    s1 = s2 = 0;
    for (int(i) = 0; (i) < (n); (i)++) {
      cin >> a;
      if (a == 1)
        s1++;
      else
        s2++;
    }
    int ans = 0;
    int b = s2 - k;
    if (b < 0) b = 0;
    s1 += b;
    ans = s1 - m;
    if (ans < 0) ans = 0;
    cout << ans << endl;
  }
  return 0;
}
