408416: GYM103115 J do NOT a=2b

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

J. do NOT a=2btime limit per test1 secondmemory limit per test256 megabytesinputstandard inputoutputstandard output

NEVER,NEVER,NEVER have $$$a = 2b$$$ in an array!

You have an array $$$P$$$, and each element is denoted as $$$p_1, p_2...p_n$$$. Now you can take any two numbers $$$a$$$ and $$$b$$$ from it. If $$$a = 2 \times b$$$ is satisfied, this array is a "bad array".

Now you need to delete some elements from this array to make it is not "bad array". Please output an integer indicating the minimum number of the elements deleted.

Input

The first line contains a positive integer $$$n(1 \leq n \leq 10^5)$$$ indicates the length of the array.

The next line contains n positive integers separated by spaces $$$p_i(1 \leq p_i \leq 10^6)$$$ Represents each element in the array.

Output

Output an integer on a line to indicate the answer.

ExampleInput
5
1 2 4 3 6
Output
2
Note

Deleting 2 and 3 or 2 and 6 can make the situation $$$a = 2 \times b$$$ is not occurring in the array.

加入题单

上一题 下一题 算法标签: