I. Decorations
In Potokolandia, there are distinct types of Christmas tree decorations, each labeled with an integer from to . The quantity of decorations of type is denoted as .
Grandpa Frost has collected all these decorations into a single pile and will randomly draw one decoration at a time. A set of drawn decorations is considered New Year-beautiful if it contains at least pairs of decorations of the same type. For instance, from the set (where identical numbers indicate decorations of the same type), a maximum of three pairs can be formed: two pairs of type decorations and one pair of type decorations.
Your task is to help Grandpa Frost determine the minimum number of decorations he must draw from the pile to ensure he has a New Year-beautiful set. It is guaranteed that if Grandpa draws all the decorations from the pile, he will be able to form at least pairs of the same type.
Input
The first line contains two integers and ().
The second line contains integers ().
Output
Output a single integer — the minimum number of decorations Grandpa Frost needs to draw to guarantee a New Year-beautiful set.
Examples
Note
In the first example, if Grandpa draws decorations from the pile, he will always be able to form pairs of decorations of the same type.