#include #include int compare_long(const void* a, const void* b) { return( *(long*)a - *(long*)b ); } int main(void){ int n; scanf( "%d", &n ); int i, j, temp; long num[n + 2]; int ans = 0; if( n == 1 ){ ans = 1; }else{ num[0] = -1; for( i = 0; i < n; i++ ){ scanf( "%d", &num[i+1] ); } num[n+1] = 100000000001; qsort(num, n + 2, sizeof(long), compare_long); for( i = 1; i <= n; i++ ){ if( num[i] != num[i+1] && num[i] != num[i-1] ){ ans++; } } } printf( "%d\n", ans ); }