#include <bits/stdc++.h>
using namespace std;
const unsigned long long P = 239017, MaxN = 2100000, INF = 1000000000;
int n, a, b, ans;
int main() {
  scanf("%d%d%d", &n, &a, &b);
  for (int i = 0; i < n; ++i) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      if (a > 0)
        --a;
      else
        ++ans;
    }
    if (t == 2) {
      if (b > 0) {
        --b;
        continue;
      }
      if (a > 0) {
        --a;
        continue;
      }
      ++ans;
    }
  }
  printf("%d", ans);
  return 0;
}
