Problem:


Score : 200 points

Problem Statement

In some other world, today is the day before Christmas Eve.

Mr. Takaha is buying N items at a department store. The regular price of the i-th item (1 \leq i \leq N) is p_i yen (the currency of Japan).

He has a discount coupon, and can buy one item with the highest price for half the regular price. The remaining N-1 items cost their regular prices. What is the total amount he will pay?

Constraints

2 \leq N \leq 10

100 \leq p_i \leq 10000

p_i is an even number.

Input

Input is given from Standard Input in the following format:

N
p_1
p_2
:
p_N

Output

Print the total amount Mr. Takaha will pay.

Sample Input 1

3
4980
7980
6980

Sample Output 1

15950

The 7980-yen item gets the discount and the total is 4980 + 7980 / 2 + 6980 = 15950 yen.

Note that outputs such as 15950.0 will be judged as Wrong Answer.

Sample Input 2

4
4320
4320
4320
4320

Sample Output 2

15120

Only one of the four items gets the discount and the total is 4320 / 2 + 4320 + 4320 + 4320 = 15120 yen.



Sample input:
3
4980
7980
6980


Sample output:
15950

Submission status: Runtime Error

Solution code:
no = int(input())
d = []
for i in range(no):
  data = input()
  d.append(data)
d_ = heapq.nlargest(no, d)
d_[0] = int(d_[0]/2)
ans = 0
for i in d_:
  ans = int(ans)+int(i)
print(ans)

Submission status: Runtime Error

Solution code:
N = int(input())
ans = 0
p_max = 0
for i in range(N):
    p = int(input())
    if p > p_min:
        print
        p_min = p
    ans+=p
print(ans-p_min//2)

Submission status: Runtime Error

Solution code:
N = input()
p = []
for i in range(N):
    p.append(input())

print(sum(p)-max(p)//2)

Submission status: Runtime Error

Solution code:
n=int(input())
l=[]
p=0
for I in range(1,n+1):
 l.append(int(input())
l.sort()
for I in l:
 p+=I
print(p+max(l))

Submission status: Runtime Error

Solution code:
#!/usr/bin/env python3
# Christmas Eve Eve

N = int(input().strip())
i = 0
p = []
while i < N:
  pi = int(input().strip())
  p.append(pi)
  i += 1
p = sorted(p)
p[-1] = p[-1]/2
print(int(sum(p))

Submission status: Runtime Error

Solution code:
#include <iostream>
#include <cstdio>
#include <cmath>
#include <vector>
#include <list>
#include <set>
#include <map>
#include <stack>
#include <queue>
#include <string>
#include <cstring>
#include <utility>
#include <algorithm>
#include <functional>
#include <deque>
#include <cctype>
#include <ctime>
#include <cstdlib>
#include <iomanip>
using namespace std;

int main(){
    int n;
    cin >> n;
    int a[n];
    for(int i = 0; i < n; ++i){
        int p;
        cin >>p;
        a[i] = p;
    }
    int sum = 0;
    int yasui = 100000;
    for(int i = 0; i < n; ++i){
        sum += a[i];
        if(yasui > a[i]) yasui = a[i];
    }
    cout << sum - yasui/2 << endl;
}

Submission status: Runtime Error

Solution code:
N = input()
p = []
max = 0
for i in range(N):
  p.append(int(input()))
  if(p[i]>max):
    maxi = i
sum = 0
for i in range(N):
  if(i == maxi):
    sum += p[i]/2
  else:
    sum += p[i]
print(sum)

Submission status: Runtime Error

Solution code:
N = int(input())                                                                                                            [0/0]
p = []
for i in range(N):
    p.append(int(input()))

ans = sum(p) - max(p)//2

print(ans)

Submission status: Runtime Error

Solution code:
n = int(input())
al = [int(input()) for _ in range(n)]
m = max(al)
s, f = 0, True
for i in range(n):
  if al[i] == m and flag:
    s += al[i] // 2
    f = False
  else:
    s += al[i]
print(s)

Submission status: Runtime Error

Solution code:
n=int(input())
l=[]
for _ in range(n):
    l.append(int(iｂnput()))
print(sum(l)-int(max(l)/2))

Submission status: Runtime Error

Solution code:
N = int(input())

answer = 0
big = 0

for i in range(N):
	a = int(input())
	answer += a
	if big < a:
		big = a

print(int(answer-(big/2))

Submission status: Runtime Error

Solution code:
n=int(input())
A=[]
for i in range(n):
  A.append(int(input())
A.sort()
print(sum(A)-A[-1]/2)

Submission status: Runtime Error

Solution code:
n = int(input())
a = list(map(int, [input() for i in range(n)]))
a.sort()
print(a[:-1]+a[-1]//2)

Submission status: Runtime Error

Solution code:
N = int(input())
A = [int(i) for i in rnage(N)]

print(sum(A) - max(A) // 2)