AT_past18_k 2で割り切れる回数
Description
For a positive integer $ x $ , let $ \rm{ord} $ $ _2(x) $ be the number of times $ 2 $ divides $ x $ .
For example, $ \rm{ord} $ $ _2(24)=3, $ $ \rm{ord} $ $ _2(17)=0, $ and $ \rm{ord} $ $ _2(32)=5 $ .
You are given a length- $ N $ sequence of integers $ A=(A_1,A_2,\dots,A_N) $ .
Find $ \displaystyle \sum^{N}_{ i=1 } $ $ \displaystyle \sum^{N}_{ j=i+1 } $ $ \rm{ord} $ $ _2(A_i + A_j) $ .
Input Format
The input is given from Standard Input in the following format:
> $ N $ $ A_1 $ $ A_2 $ $ \dots $ $ A_N $
Output Format
Print the answer as an integer.
Explanation/Hint
### Sample Explanation 1
- $ \rm{ord} $ $ _2(2+3) = $ $ \rm{ord} $ $ _2(5) = 0 $
- $ \rm{ord} $ $ _2(2+5) = $ $ \rm{ord} $ $ _2(7) = 0 $
- $ \rm{ord} $ $ _2(2+7) = $ $ \rm{ord} $ $ _2(9) = 0 $
- $ \rm{ord} $ $ _2(2+11) = $ $ \rm{ord} $ $ _2(13) = 0 $
- $ \rm{ord} $ $ _2(3+5) = $ $ \rm{ord} $ $ _2(8) = 3 $
- $ \rm{ord} $ $ _2(3+7) = $ $ \rm{ord} $ $ _2(10) = 1 $
- $ \rm{ord} $ $ _2(3+11) = $ $ \rm{ord} $ $ _2(14) = 1 $
- $ \rm{ord} $ $ _2(5+7) = $ $ \rm{ord} $ $ _2(12) = 2 $
- $ \rm{ord} $ $ _2(5+11) = $ $ \rm{ord} $ $ _2(16) = 4 $
- $ \rm{ord} $ $ _2(7+11) = $ $ \rm{ord} $ $ _2(18) = 1 $
Their sum is $ 12 $ .
### Sample Explanation 3
Note that the answer may not fit into $ 32 $ -bit integer type, which is not exemplified in the samples.
### Constraints
- All input values are integers.
- $ 2 \le N \le 10^5 $
- $ 1 \le A_i \le 10^9 $