#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, a, b, res = 0;
  cin >> n >> a >> b;
  int x = a, y = b;
  for (int i = 0; i < n; i++) {
    int c;
    cin >> c;
    if (c == 1)
      if (x == 0)
        res++;
      else
        x--;
    else if (y == 0)
      if (x == 0)
        res++;
      else
        x--;
    else
      y--;
  }
  cout << res << endl;
  return 0;
}
