DMPG '17 B6 - Multiply and Surrender

View as PDF

Submit solution

Points: 7 (partial)
Time limit: 1.0s
Memory limit: 64M

Author:
Problem type

Roger has found N numbers, numbered A1,A2,,AN. Roger wants to know how many digits there are in the binary representation of the product A1×A2××AN. Help Roger find this number!

Input Specification

The first line will consist of a single integer, N.
The next line will consist of N space separated integers, A1,A2,,AN.

Output Specification

Print the number of digits in the binary representation of the product A1×A2××AN.

Constraints

Subtask 1 [10%]

1N10

1Ai10

Subtask 2 [90%]

1N105

1Ai1018

Sample Input

Copy
5
2 2 2 2 2

Sample Output

Copy
6

Explanation of Sample Output

Let Xdec denote a decimal number and Xbin denote a binary number. 2dec×2dec×2dec×2dec×2dec=32dec=100000bin.


Comments

There are no comments at the moment.