Problem: You are given a Young diagram.
Given diagram is a histogram with columns of lengths ().
Young diagram for .
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.
Input Format: 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 Format: Output one integer: the largest number of non-overlapping dominos that you can draw inside of the given Young diagram.
Note: Some of the possible solutions for the example: