题目描述
Problem Description
Takahashi has a magic box.
When an integer is put into this box, it outputs a corresponding integer.
The output integer is determined solely by the input integer, and the same input always yields the same result.
Takahashi noticed that for any integer $ x $, the integer output when $ x $ is put in is the same as when $ 2x $ is put in.
Given $ N $ integers that Takahashi puts into the box, find the maximum number of different integers that can be output.
Input Format
The input is given from the standard input in the following format:
$ N $ $ a_1 $ $ a_2 $ .. $ a_N $
- The first line contains the number of integers $N\ (\ 1\ ≦\ N\ ≦\ 10^5)$ that Takahashi puts into the box.
- The second line contains $ N $ integers separated by spaces that Takahashi puts into the box.
- It is guaranteed that $1\ ≦\ a_i\ ≦\ 10^9\ (\ 1\ ≦\ i\ ≦\ N)$.
- It is guaranteed that $a_i\ ≠\ a_j$ when $i\ ≠\ j$.
Output Format
Output the maximum number of different integers that can be output to the standard output.
Do not forget the newline at the end.
Sample Input and Output
Sample Input #1
3
1 2 3
Sample Output #1
2
Sample Input #2
4
2 4 8 16
Sample Output #2
1
Sample Input #3
4
2 3 5 7
Sample Output #3
4
Notes/Hints
Partial Points
This problem has partial points.
- For $ 20 $ points worth of test cases, $1\ ≦\ N\ ≦\ 3,000$ is satisfied.
- For another $ 30 $ points worth of test cases, $1\ ≦\ a_i\ ≦\ 5*10^5\ (\ 1\ ≦\ i\ ≦\ N)$ is satisfied.
Sample Explanation 1
The integer output when $ 2 $ is put in is the same as when $ 1 $ is put in, so the maximum number of different integers output is $ 2 $.
Sample Explanation 2
All inputs yield the same output.
Sample Explanation 3
All outputs could be different.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分