Two times two
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
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
For each list print in a separate line the number of integers that are twice more than the other numbers in a list.