| ||Fox Ciel likes powers of two.
She has a bag with some positive powers of two.
Note that some powers may occur multiple times in the bag.
You are given a long powers.
Each element of powers is one of the numbers in Ciel's bag.
Ciel likes each non-negative integer that can be written as the sum of some numbers from her bag.
For example, suppose that her bag contains the numbers 2, 4, 4, and 64.
In this case, Ciel likes 10 (because 10=2+4+4), 64 (because 64=64), and also 0 (the sum of no numbers).
She does not like 1, and she does not like 12 (note that 12=4+4+4 is not valid, as she only has two 4s; 12=4+4+2+2 is also not valid, as she only has one 2).
Return the number of integers Ciel likes.
|Method signature:||long count(long powers)|
|(be sure your method is public)|
|-||powers will contain between 1 and 50 elements, inclusive.|
|-||Each element of powers is a power of two between 1 and 2^50, inclusive.|
|Fox Ciel likes 0, 1, 2 and 3.|
|Fox Ciel likes 0, 1, 2, 3 and 4.|
This problem statement is the exclusive and proprietary property of TopCoder, Inc. Any unauthorized use or reproduction of this information without the prior written consent of TopCoder, Inc. is strictly prohibited. (c)2010, TopCoder, Inc. All rights reserved.