eolymp
bolt
Try our new interface for solving problems

Nuts

Today, Sema and Yura attended the closing ceremony of one Olympiad. On the holiday tables there were n plates of nuts. The i-th plate contains ai nuts.

In one minute Sema can choose some plates and a certain number x, after which from each selected plate he picks up exactly x nuts (of course, each selected plate should have at least x nuts).

Determine in what minimum number of minutes all the nuts will be in Sema's pocket.

Input

The first line contains one integer n (1n50) - the number of plates with nuts.

Second line contains n integers a1, a2, ..., an (1ai50) - the number of the nuts in the i-th plate.

Output

Print a single number - the required minimum number of minutes.

Time limit 1 second
Memory limit 128 MiB
Input example #1
4
7 4 11 7
Output example #1
2
Source 2019 ACM, SEERC, 1/8 Finals, April 13