#include <bits/stdc++.h>
using namespace std;
int main() {
  int a[3] = {0};
  int n, m, k;
  cin >> n >> m >> k;
  a[1] = m;
  a[2] = k;
  int ans = 0;
  for (int i = 0; i < n; i++) {
    int j;
    cin >> j;
    if (j == 1) {
      if (a[1] == 0)
        ans++;
      else
        a[1]--;
    } else {
      if (a[1] == 0 && a[2] == 0)
        ans++;
      else {
        if (a[2] != 0)
          a[2]--;
        else
          a[1]--;
      }
    }
  }
  cout << ans << endl;
}
