/NPTEL-Introduction-to-Programming-in-C-Assignment-4-Question-2

NPTEL Introduction to Programming in C Assignment 4 Question 2

Primary LanguageCGNU General Public License v3.0GPL-3.0

NPTEL-Introduction-to-Programming-in-C-Assignment-4-Question-2

NPTEL Introduction to Programming in C Assignment 4 Question 2

Question 2

Find the number of distinct numbers in a given sequence. The sequence need not be sorted.

Input

The input consists of two lines. The first line consists of a positive number N. N is at most 1000. The second line consists of N numbers separated by spaces.

Output

The output should be the number of distinct elements in the sequence.

Sample Input 1

4 
1 2 3 1

Sample Output 1

3

Sample Input 2

4 
33 66 77 66

Sample Output 2

3

Sample Input 3

7
0 0 0 0 0 0 0

Sample Output 3

1

Sample Input 4

5
1 2 3 4 -5

Sample Output 4

5