#include <bits/stdc++.h>
using namespace std;
int main() {
  int arr[5009], n;
  cin >> n;
  for (int i = 0; i < n; i++) cin >> arr[i];
  sort(arr, arr + n);
  int cnt = 0;
  int ans = 0;
  int chk;
  bool fs = false;
  while (cnt < n) {
    fs = false;
    for (int i = n - 1; i >= 0; i--) {
      if (!fs && arr[i]) {
        chk = arr[i];
        fs = true;
        cnt++;
        ans++;
        arr[i] = 0;
        continue;
      }
      if (arr[i] < chk && arr[i]) {
        cnt++;
        chk = arr[i];
        arr[i] = 0;
      }
    }
  }
  cout << ans << endl;
}
