#LC003. #C.阶乘

#C.阶乘

Title Description

There are nn positive integers a[i]a [i] , and their product is pp . You can multiply pp by a positive integer qq , so that p×qp \times q is exactly the factorial of the positive integer mm , and find the minimum value of mm .

Input format

Two lines in total. The first line contains a positive integer nn. The second line contains nn positive integers a[i]a[i].

Output format

There is one positive integer mm in each row.

Example

1
6
3

Data scale and agreement

For data of 10%10 \% , n10n \le 10;

For data of 30%30 \% , n1000n \le 1000;

For data of 100%100 \% , n100000,a[i]100000n \le 100000, a [i] \le 100000.