#t297. 两倍

两倍

Twice

Problem Background

Special for beginners, ^_^

Problem Description

Given between 22 and 1515 positive integers, your task is to count how many pairs of numbers satisfy: one number in the pair is twice the other.

For example, given 1 4 3 2 9 7 18 22, the answer is 33, because 22 is twice 11, 44 is twice 22, and 1818 is twice 99.

Input Format

One line giving between 22 and 1515 positive integers less than 100100. The input ends with a 00.

Output Format

One integer: the number of pairs in which one number is twice the other.

Sample Input

1 4 3 2 9 7 18 22 0

Sample Output

3

Constraints

Time limit: 1s, memory limit: 1024KiB for each test case.