#include <bits/stdc++.h>
using namespace std;
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(0);
  int n, cnt = 0, x;
  cin >> n;
  vector<int> v;
  for (int i = 0; i < n; ++i) {
    cin >> x;
    v.push_back(x);
  }
  sort(v.begin(), v.end());
  for (int i = 0; i < n; ++i) {
    if (v[i] != v[i + 1]) cnt++;
  }
  cout << cnt;
}
