#include using namespace std; int main() { int n; cin >> n; int64_t a[n + 2]; for (int i = 0; i < n; i++) cin >> a[i]; a[n] = 0; a[n + 1] = 1e9 + 7; sort(a, a + n + 2); int64_t 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; }