#include <bits/stdc++.h>
using namespace std;
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
int main() {
  int n;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; i++) {
    int n1;
    cin >> n1;
    v.push_back(n1);
  }
  vector<pair<int, int>> v2;
  for (int i = 0; i < n; i++) {
    v2.push_back(make_pair(v[i], 0));
  }
  sort(v2.begin(), v2.end(), sortinrev);
  int pile = 0;
  int n1 = n;
  for (int i = 0; i < v2.size(); i++) {
    vector<int> v1;
    if (v2[i].second != -1) {
      pile = pile + 1;
      n1 = n1 - 1;
      v1.push_back(v2[i].first);
      v2[i].second = -1;
      for (int j = i + 1; j < v2.size(); j++) {
        if (v2[j].second != -1) {
          if (v2[j].first == v1[v1.size() - 1]) {
            if (n1 <= v1[v1.size() - 1]) {
              v1.push_back(v2[j].first);
              int k = 0;
              for (; k < v1.size(); k++) {
                if (v1[k] < v1.size() - (k + 1)) {
                  break;
                }
              }
              if (k < v1.size()) {
                v1.pop_back();
              }
              if (k >= v1.size()) {
                v2[j].second = -1;
              }
            }
            n1 = n1 - 1;
          } else if (v2[j].first != v1[v1.size() - 1]) {
            v1.push_back(v2[j].first);
            int k = 0;
            for (; k < v1.size(); k++) {
              if (v1[k] < v1.size() - (k + 1)) {
                break;
              }
            }
            if (k < v1.size()) {
              v1.pop_back();
            }
            if (k >= v1.size()) {
              v2[j].second = -1;
            }
            n1 = n1 - 1;
          }
        }
      }
      for (int l = 0; l < v1.size(); l++) {
        if (v1[l] > v1.size() - (l + 1)) {
          int dif = v1[i] - (v1.size() - (l + 1));
          int m = 0;
          while (m < v2.size() and dif > 0) {
            if (v2[m].first <= v1[l] and v2[m].second != -1) {
              v1.insert(v1.begin() + (l + 1), v2[m].first);
              int b = 0;
              for (; b < v1.size(); b++) {
                if (v1[b] < v1.size() - (b + 1)) {
                  break;
                }
              }
              if (b < v1.size()) {
                v1.erase(v1.begin() + (l + 1));
              }
              if (b >= v1.size()) {
                v2[m].second = -1;
                dif = dif - 1;
              }
            }
            m = m + 1;
          }
        }
      }
      n1 = n - v1.size();
      n = n1;
    }
  }
  cout << pile << endl;
  return 0;
}
