#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n, x;
  cin >> n;
  priority_queue<int, vector<int>, greater<int> > Q;
  for (int i = 0; i < n; i++) {
    cin >> x;
    Q.push(x);
  }
  int ans = 0;
  auto V = vector<int>();
  int cnt = 0, t;
  while (n) {
    t = Q.top();
    if (t >= cnt) {
      cnt++;
      Q.pop();
      n--;
    } else {
      if (!V.empty()) V.clear();
      while (!Q.empty() && (Q.top() < cnt)) {
        V.push_back(Q.top());
        Q.pop();
      }
      if (Q.empty()) {
        ans++;
        cnt = 0;
        for (auto v : V) Q.push(v);
      } else if (Q.top() >= cnt) {
        assert(!Q.empty());
        cnt++;
        Q.pop();
        n--;
        for (auto v : V) Q.push(v);
      }
    }
  }
  if (cnt > 0) ans++;
  cout << ans << endl;
  return 0;
}
