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