#CCBCHBAHAI0000085. Đếm số giá trị phân biệt - miền 0..1000 (Count Distinct Values in the Range 0..1000)
Đếm số giá trị phân biệt - miền 0..1000 (Count Distinct Values in the Range 0..1000)
Count Distinct Values in the Range 0..1000
Source: Phước Hưng OJ
Version: Phuoc Hung OJ Extended
Problem
Given with , let
Compute the number of distinct values .
Input
The first line contains . The second line contains integers in .
Output
Print , the number of distinct values.
Subtask
Subtask 1 (20 points): , .
Subtask 2 (30 points): , .
Subtask 3 (50 points): , .
Example
Input
9
3 3 0 7 3 7 1000 0 5
Output
5
Explanation
The output follows directly from the mathematical definition above.