Олимпиадный тренинг

Задача 38922. Until the New Year!


Задача

Темы: Циклы
In some other world today is December 29th. Daryona and her grandfather Kokovaniy decided to buy N goods at the department store for a fun New Year celebration. The regular price of the ith item (1 <= i <= N) is pi silver pebbles, and p i is always even. Kokovani's grandfather has a discount coupon and can buy one item at the highest price for half the regular price. The remaining N − 1 items are at their regular price. How many times does the Silver Hoof need to be hit so that Darena and her grandfather can pay for the goods? For one hit, one silver pebble flies out from under the hoof. 

Input
The first line contains an integer N (2 <= N <= 105). The following N lines contain positive even integers pi (100 <= pi <= 106), each number on a separate line.

Imprint
Display the answer to the problem.
 
Examples
# Input Output
1
3
4980
7980
6980
15950