#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, ans = 0, t = 0;
  int arr[1000];
  bool men[700] = {}, z = false;
  cin >> n;
  for (int i = 0; i < (int)(n); ++i) {
    cin >> arr[i];
    if (arr[i] == 0) z = true;
    if (!men[arr[i]] && arr[i] != 0) {
      ans++;
      men[arr[i]] = true;
      t++;
    } else {
      t++;
    }
  }
  cout << ans + (t < n && !z) << endl;
  return 0;
}
