#include <bits/stdc++.h>
using namespace std;
int A[101];
int n;
int dp[101][101][101];
int getAll() {
  int tot = 0;
  int carry = 0;
  for (int i = 100; i >= 0; i--) {
    if (A[i] > tot) {
      carry = carry + A[i] - tot;
      if (carry > 0) {
        carry--;
        tot++;
      }
    } else {
      carry = max(0, carry - (tot - A[i]));
    }
  }
  return tot + carry;
}
int f(int carry, int i, int tot) {
  if (i == -1) return carry + tot;
  if (dp[carry][i][tot] != -1) return dp[carry][i][tot];
  int mn = 9999;
  if (A[i] > tot) {
    carry = carry + A[i] - tot;
    for (int j = 0; j <= carry; j++) {
      mn = min(mn, f(carry - j, i - 1, tot + j));
    }
  } else {
    mn = min(mn, f(max(0, carry - (tot - A[i])), i - 1, tot));
  }
  return dp[carry][i][tot] = mn;
}
int main(int argc, char const *argv[]) {
  cin >> n;
  int tmp;
  for (int i = 0; i < n; i++) {
    cin >> tmp;
    A[tmp]++;
  }
  memset(dp, -1, sizeof(dp));
  cout << f(0, 100, 0) << endl;
  return 0;
}
