#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int n;
  cin >> n;
  vector<int> a(n);
  for (int &i : a) cin >> i;
  sort(begin(a), end(a));
  vector<int> c;
  int p = 0;
  for (int i = 1; i < n; ++i)
    if (a[i] != a[i - 1]) c.push_back(i - p), p = i;
  c.push_back(n - p);
  int r = 0;
  for (;;) {
    int mn = INT_MAX;
    for (int i : c)
      if (i) mn = min(mn, i);
    if (mn == INT_MAX) break;
    r += mn;
    for (int &i : c)
      if (i) i -= mn;
  }
  cout << r;
  return 0;
}
