#include <bits/stdc++.h>
using namespace std;
int main() {
  int number, sum = 0;
  bool a = 1;
  cin >> number;
  int *participants = new int[number];
  for (int c = 0; c < number; c++) {
    cin >> participants[c];
    if (participants[c]) {
      for (int i = c - 1; i >= 0; i--)
        if (participants[c] == participants[i]) a = 0;
      if (a) sum++;
      a = 1;
    }
  }
  cout << sum;
}
