1113_B. Sasha and Magnetic Machines
One day Sasha visited the farmer 2D and his famous magnetic farm. On this farm, the crop grows due to the influence of a special magnetic field. Maintaining of the magnetic field is provided by n machines, and the power of the i-th machine is a_i. 

This year 2D decided to cultivate a new culture, but what exactly he didn't say. For the successful growth of the new culture, it is necessary to slightly change the powers of the machines. 2D can at most once choose an arbitrary integer x, then choose one machine and reduce the power of its machine by x times, and at the same time increase the power of one another machine by x times (powers of all the machines must stay positive integers). Note that he may not do that if he wants. More formally, 2D can choose two such indices i and j, and one integer x such that x is a divisor of a_i, and change powers as following: a_i = (a_i)/(x), a_j = a_j ⋅ x

Sasha is very curious, that's why he wants to calculate the minimum total power the farmer can reach. There are too many machines, and Sasha can't cope with computations, help him!

Input

The first line contains one integer n (2 ≤ n ≤ 5 ⋅ 10^4) — the number of machines.

The second line contains n integers a_1, a_2, …, a_n (1 ≤ a_i ≤ 100) — the powers of the machines.

Output

Print one integer — minimum total power.

Examples

Input


5
1 2 3 4 5


Output


14


Input


4
4 2 4 4


Output


14


Input


5
2 4 2 3 7


Output


18

Note

In the first example, the farmer can reduce the power of the 4-th machine by 2 times, and increase the power of the 1-st machine by 2 times, then the powers will be: [2, 2, 3, 2, 5].

In the second example, the farmer can reduce the power of the 3-rd machine by 2 times, and increase the power of the 2-nd machine by 2 times. At the same time, the farmer can leave is be as it is and the total power won't change.

In the third example, it is optimal to leave it be as it is.
```python
"""""""""""""""""""""""""""""""""""""""""""""
|    author: mr.math - Hakimov Rahimjon     |
|    e-mail: mr.math0777@gmail.com          |
"""""""""""""""""""""""""""""""""""""""""""""
#inp = open("spaceship.in", "r"); input = inp.readline; out = open("spaceship.out", "w"); print = out.write
TN = 1


# ===========================================
  
  
def solution():
    n = int(input())
    a = list(map(int, input().split()))
    sm = sum(a)
    mn = min(a)
    s = [sm]
    for i in range(n):
        for j in range(2, int((a[i])**(1/2))+1):
            if a[i] % j == 0:
                s.append(sm-a[i]-mn+a[i]//j+mn*j)
    print(min(s))


# ===========================================
while TN != 0:
    solution()
    TN -= 1
# ===========================================
#inp.close()
#out.close()
```