#P1268B. Domino for Young
Domino for Young
No submission language available for this problem.
Description
You are given a Young diagram.
Given diagram is a histogram with columns of lengths ().

Your goal is to find the largest number of non-overlapping dominos that you can draw inside of this histogram, a domino is a or rectangle.
The first line of input contain one integer (): the number of columns in the given histogram.
The next line of input contains integers (): the lengths of columns.
Output one integer: the largest number of non-overlapping dominos that you can draw inside of the given Young diagram.
Input
The first line of input contain one integer (): the number of columns in the given histogram.
The next line of input contains integers (): the lengths of columns.
Output
Output one integer: the largest number of non-overlapping dominos that you can draw inside of the given Young diagram.
Samples
Note
Some of the possible solutions for the example: