#include <bits/stdc++.h>
using namespace std;
const int N = 110, mz = 1e9 + 7;
set<int> s;
int main() {
  int n, a;
  scanf("%d", &n);
  while (n--) {
    scanf("%d", &a);
    if (a) s.insert(a);
  }
  printf("%d\n", s.size());
  return 0;
}
