#include <bits/stdc++.h>
using namespace std;
int main() {
int t;
t=1;
// cin >> t;
while (t--){
int n;
cin >> n;
set<int> f;
int A[n];
for(int i=0;i<n;i++){
cin >> A[i];
f.insert(A[i]);
}
cout << f.size() << endl;
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWludCB0OwoJdD0xOwoJLy8gY2luID4+IHQ7Cgl3aGlsZSAodC0tKXsKCQlpbnQgbjsKCWNpbiA+PiBuOwoJc2V0PGludD4gZjsKCWludCBBW25dOwoJZm9yKGludCBpPTA7aTxuO2krKyl7CgkJY2luID4+IEFbaV07CgkJZi5pbnNlcnQoQVtpXSk7Cgl9Cgljb3V0IDw8IGYuc2l6ZSgpIDw8IGVuZGw7Cgl9CglyZXR1cm4gMDsKfQ==