|시간 제한||메모리 제한||제출||정답||맞은 사람||정답 비율|
|1 초||128 MB||0||0||0||0.000%|
One of the most popular games organized by Byteland Lottery is "Huge blend". The rules of this game are simple. From the container with a fixed number of balls in it (each of them has a natural number assigned), some number of balls are chosen. In the next step the product of all numbers from the chosen balls is calculated. That product is the winning number. The person who guesses the right number wins the main prize. Before the drawing, it is known how many balls will take part in it. The numbers written on the balls are also known. It is not known however, how many balls will be selected - maybe all of them, or maybe only one.
ByteGuy always wanted to win "Huge blend", however years of fruitless attempts caused that he started to wonder about the chances of winning. He decided to count the number n - the sum of all possible results of draws. Unfortunately, ByteGuy's computer overheated during calculations, so he asked you to help him calculate something simpler - the value of F(n), where F is a function defined as follows:
For example: F(9) = 9, F(123) = 6, F(9876) = F(30) = 3.
Write a program which:
The first line of the standard input contains a natural number l - the number of balls taking part in a draw, 1 ≤ l ≤ 106. In the second line there are l natural numbers wm, 0 ≤ wm ≤ 108 - numbers written on the balls. They are separated with single spaces.
One integer is to be written to the standard output. This integer should be the value of F(n).
3 10 13 12