#include using namespace std; typedef unsigned long long ul; typedef signed long long ll; int main(void) { std::cin.tie(0); std::ios::sync_with_stdio(false); std::cout << std::fixed; ll n; cin >> n; ll a[n+2]; for (ll i = 0; i < n; ++i) cin >> a[i]; a[n] = 0; a[n+1] = 1000000007; sort(a, a+n+2); ll ans = 0; for (int i = 1; i <= n; ++i) { if (a[i-1] != a[i] && a[i] != a[i+1]) ans++; } cout << ans << endl; return 0; }