eolymp
bolt
Try our new interface for solving problems
Problems

Two times two

Two times two

Time limit 1 second
Memory limit 122 MiB

To develop the mathematical abilities in students the next exercise is proposed. We have a list consisting of non-repeating random positive integers. The length of the list varies from 2 to 15. Count how many numbers in the list equals to twice the number in the same list. You should write a program that will help students to do the assignment. The program must review the proposed lists and print for each of them the correct answer. For example, given a list

1 4 3 2 9 7 18 22

Your program must answer 3 because 2 = 2 * 1, 4 = 2 * 2 and 18 = 9 * 2.

Input data

Consists of one or more lists of numbers. Each line contains a list with distinct positive integers (from 2 to 15 integers). All the numbers do not exceed 99. Each line ends with a zero, which is not considered as a part of the list. A string with a single number -1 means the end of input data. Some lists may not have any double value.

Output data

For each list print in a separate line the number of integers that are twice more than the other numbers in a list.

Examples

Input example #1
1 4 3 2 9 7 18 22 0
2 4 8 10 0
7 5 11 13 1 3 0
-1
Output example #1
3
2
0