#include <bits/stdc++.h>
using namespace std;
int main() {
  long long N, a;
  cin >> N;
  vector<long long> v;
  for (int i = N; i > 0; i--) {
    cin >> a;
    v.push_back(a);
  }
  sort(v.begin(), v.end());
  cout << v.end() - v.begin() << endl;
  return 0;
}
