#include #include #include using namespace std; int main(){ int n;cin>>n; if(n==1){ cout << 1 << endl; return 0; } vector a(n); for(int i = 0; n > i; i++){ cin>>a[i]; } sort(a.begin(),a.end()); int ans = 0; for(int i = 0; n > i; i++){ if(!i){ if(a[i] != a[i+1])ans++; }else if(i == n-1){ if(a[i-1] != a[i])ans++; }else{ if(a[i-1] != a[i] && a[i] != a[i+1])ans++; } } cout << ans << endl; }