#include using namespace std; #define REP(i, n) for(int i = 0; i < n; i++) #define VSORT(v) sort(v.begin(), v.end()) #define ALL(a) (a).begin(),(a).end() int main() { ios::sync_with_stdio(false); cin.tie(0); int n; cin >> n; vector a(n); REP(i, n) cin >> a[i]; VSORT(a); int ans = 0; REP(i, n) { while (a[i] == a[i + 1]) i++; if (upper_bound(ALL(a), a[i]) - lower_bound(ALL(a), a[i]) == 1) ans++; } cout << ans << endl; return 0; }