#include <cstdio>
#include <set>
using namespace std;

int main(void){
    int n, t, sum = 0;
    scanf("%d", &n);
    set<int> s;
    for (int i = 1; i <= n; i++) {
        scanf("%d", &t);
        if (s.find(t) == s.end()) { s.insert(t); sum++; }
    }
    printf("%d\n", sum);
    return 0;
}

