#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, l = 0, j = 0;
  int a[10000] = {0};
  int b[10000] = {0};
  cin >> n;
  for (i = 0; i < n; i++) {
    cin >> a[i];
    b[a[i]] = 1;
    if (a[i] > j) j = a[i];
  }
  for (i = 1; i <= j; i++) {
    if (b[i] == 1) l++;
  }
  cout << l << endl;
  return 0;
}
