#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  int n;
  cin >> n;
  int *a = new int[n];
  for (int i = 0; i < n; i++) cin >> a[i];
  sort(a, a + n);
  cout << unique(a, a + n) - a - (a[0] == 0) << endl;
  return 0;
}
