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.

Solution (Python):
s=[int(input()) for _ in range(int(input()))]
print(int(sum(s)-max(s)/2))

Solution (Python):
N = int(input())

p_list = [int(input()) for _ in range(N)]

p_list.sort()
p_list[-1] = p_list[-1] // 2

print(sum(p_list))

Solution (Python):
n = int(input())
p = []
for i in range(n):
    p.append(int(input()))
p = sorted(p)
print(sum(p) - p[-1] // 2)

Solution (Python):
N = int(input())
list_p = [int(input()) for i in range(N)]

print(max(list_p)//2 +sum(list_p)-max(list_p))

Solution (Python):
n=int(input())
p=sorted([int(input()) for i in range(n)])
print(p[-1]//2+sum(p[:-1]))

Solution (Python):
import heapq

lst = []
for i in range(int(input())):
    lst.append(int(input()) * -1)

heapq.heapify(lst)
lst[0] //= 2
print(sum(-x for x in lst))

Solution (Python):
n=int(input())
p=[int(input()) for _ in range(n)]
print(sum(p)-max(p)//2)

Solution (Python):
N, *P = map(int, open(0).read().split())
print(sum(P)-int(max(P)//2))

Solution (Python):
n=int(input())
P=sorted([int(input()) for _ in range(n)])
print(sum(P)-P[n-1]//2)

Solution (Python):
N = int(input())
P = sorted([int(input()) for n in range(N)])
print(sum(P)-P[-1]//2)

Solution (Python):
n=int(input())
p=sorted([int(input()) for i in range(n)])
print(p[-1]//2+sum(p[:-1]))

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(N)]
print(int(sum(p) - (max(p)/2)))

Solution (Python):
n = int(input())
li = []
for i in range(n):
    li.append(int(input()))
print(sum(li) - max(li)//2)

Solution (Python):
def main():
    n = int(input())
    P = []
    for i in range(n):
        P.append(int(input()))
    print(int(sum(P)-max(P)/2))


if __name__ == '__main__':
    main()

Solution (Python):
N = int(input())
p = [int(input()) for i in range(N)]
p.sort(reverse = True)

ans = int(p[0] / 2) + sum(p[1:])
print(ans)

Solution (Python):
n = int(input())
p = [int(input()) for i in range(n)]

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

Solution (Python):
n = int(input())
l = [int(input()) for i in range(n)]
p = max(l)
l.remove(p)
print(p//2 + sum(l))

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

Solution (Python):
N = int(input())
p = []
for _ in range(N):
    p.append(int(input()))
p.sort(key=lambda x: -x)
print(p[0] // 2 + sum(p[1:]))

Solution (Python):
n = int(input())
p = []
for _ in range(n) :
    p += [int(input())]
print(sum(p) - max(p) // 2)

Solution (Python):
n=int(input())
li=[]
for i in range(n):
  li.append(int(input()))
x=max(li)/2
print(int((sum(li)-x)))

Solution (Python):
n = int(input())
list1 = [int(input()) for i in range(n) ]
list1.sort(reverse = True)
print(list1[0]//2+sum(list1[1:]))

Solution (Python):
n=int(input())
p=[int(input()) for i in range(n)]
p=sorted(p)
ans=sum(p[:n-1])+int(p[-1]/2)
print(ans)

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(N)]
print(sum(p)-max(p)//2)

Solution (Python):


n = int(input())
l=[int(input()) for i in range(n)]

l.sort()
l[len(l)-1]=l[len(l)-1]/2

print(int(sum(l)))

Solution (Python):

n = int(input())
p = [int(input()) for _ in range(n)]

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

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(N)]
print(sum(p) - max(p) + max(p)//2)

Solution (Python):
N = int(input())
l = []
for i in range(N):
    p = int(input())
    l.append(p)
l.sort()
print(int(sum(l[:N-1]) + l[N-1]/2))

Solution (Python):
n=int(input())
p=[]
for i in range(n):
  p.append(int(input()))
x=max(p)/2
print(int(sum(p)-x))

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(N)]
print(sum(p) - max(p) + max(p)//2)

Solution (Python):

N = int(input())
A = list(int(input()) for i in range(N))

A.sort(reverse=True)

A[0] = int(A[0]//2)
ans = 0
for i in range(len(A)):
    ans += A[i]

print(ans)

Solution (Python):
n = int(input())
items = [int(input()) for i in range(n)]

max = items.pop(items.index(max(items)))
print(max//2 + sum(items))

Solution (Python):
n=int(input())
p=sorted([int(input()) for i in range(n)])
p[n-1]//=2
print(sum(p))

Solution (Python):
n=int(input())
p=[int(input()) for i in range(n)]
q=max(p)
print(int(sum(p))-int(max(p)/2))

Solution (Python):
N = int(input())
p = []
for i in range(N):
    p.append(int(input()))
p.sort()
p[-1] //= 2
print(sum(p))

Solution (Python):
N = int(input())
P = []
for i in range(N):
  P.append(int(input()))
sum_ = 0
print(sum(P) - max(P)//2)

Solution (Python):

import sys










def main():
    n, *p = (int(x) for x in sys.stdin.read().split())
    total_cost = sum(p) - max(p) // 2
    print(total_cost)


if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
L = []
for i in range(N):
    s = int(input())
    L.append(s)
ans = sum(L) - max(L)/2
print(int(ans))

Solution (Python):
n = int(input())
l = sorted(int(input()) for i in range(n))
print(sum(l) - l[-1]//2)

Solution (Python):
N = int(input())
l = list([int(input()) for _ in range(N)])

ans = 0
ans += int(l.pop(l.index(max(l)))/2)

for i in l:
  ans += i
  
print(ans)

Solution (Python):
n = int(input())
a_L = []
for val in range(n):
    a_L.append(int(input()))

a_L = sorted(a_L,reverse=True)
a_L[0] /=2
print(int(sum(a_L)))

Solution (Python):
n = int(input())
a_L = []
for val in range(n):
    a_L.append(int(input()))

a_L = sorted(a_L,reverse=True)
a_L[0] /=2
print(int(sum(a_L)))

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
p.sort()
print(sum(p[:-1]) + p[-1] // 2)

Solution (Python):

import numpy as np
N = int(input())
p = np.zeros(N, dtype=int)
for i in range(N):
  p[i] = int(input())

p_sort = np.sort(p)
sum = p_sort[-1]*0.5
for i in range(N-1):
  sum += p_sort[i]
print(int(sum))

Solution (Python):
import sys
def input(): return sys.stdin.readline().strip()

def main():
    n=int(input())
    pp=[]
    for _ in range(n):
        pp.append(int(input()))
    print(sum(pp)-max(pp)//2)

main()

Solution (Python):
n = int(input())
P = sorted([ int(input()) for _ in range(n) ])
print(sum(P[:-1]) + P[-1]//2)

Solution (Python):
a = [int(input()) for _ in range(int(input()))]
a[a.index(max(a))] //= 2
print(sum(a))

Solution (Python):
import os, sys, re, math

N = int(input())

item = []

for _ in range(N):
    item.append(int(input()))

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

Solution (Python):
N = int(input())
li = [int(input()) for i in range(N)]
print(sum(li)-max(li)//2)

Solution (Python):
from sys import stdin
from itertools import groupby

n = int(stdin.readline().rstrip())
li = [int(stdin.readline().rstrip()) for _ in range(n)]

li.sort()

print(sum(li[:n-1])+li[n-1]//2)

Solution (Python):
n = int(input())
maxv = 0
total = 0
for i in range(n):
	tmp = int(input())
	maxv = max(maxv, tmp)
	total += tmp
print (total - int(maxv / 2))

Solution (Python):
import os, sys, re, math

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

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

Solution (Python):
n = int(input())
ps = [int(input()) for _ in range(n)]
ans = sum(ps)
for i in range(n):
  ans = min(ans, sum([(ps[j] // 2 if i == j else ps[j]) for j in range(n)]))
print(ans)

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

Solution (Python):

import sys


def solve(N: int, p: "List[int]"):
    ans = sum(p) - max(p)/2
    print(int(ans))



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  
    p = [int(next(tokens)) for _ in range(N)]  
    solve(N, p)

if __name__ == '__main__':
    main()

Solution (Python):

Row=int(input())
l=[int(input()) for i in range(Row)]
print(sum(l)-int(max(l)/2))

Solution (Python):

l=[int(input()) for i in range(int(input()))]
print(sum(l)-int(max(l)/2))

Solution (Python):
N = int(input())
ps = []
for n in range(N):
    p = int(input())
    ps.append(p)
max = max(ps)
print(sum(ps) - max + max // 2)

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
print(sum(p) - max(p) // 2)

Solution (Python):
n = int(input())
p = [int(input()) for i in range(n)]
ans = sum(p) - max(p)//2
print(ans)

Solution (Python):
n = int(input())
lis = []
for i in range(n):
    lis.append(int(input()))
ans = sum(lis) - max(lis) / 2
print(int(ans))

Solution (Python):
l = [int(input()) for _ in range(int(input()))]
print(sum(l)-int(max(l))//2)

Solution (Python):
N =int(input())
p=[]
for i in range(N):
  p +=[int(input())]
p.sort()
print(int(sum(p[0:N-1])+int(p[-1])/2))

Solution (Python):
N = int(input())
p = []

for i in range(N):
    p.append(int(input()))

p.sort(reverse=True)
p[0] /= 2
print(int(sum(p)))

Solution (Python):
N = int(input())
P = sorted([int(input()) for _ in range(N)], reverse=True)
print(P[0]//2 + sum(P[1:]))

Solution (Python):

n = int(input())



m = 0
to = 0
for i in range(n):
	a = int(input())
	to += a
	if a > m:
		m = a
print(to-m//2)

Solution (Python):
N = int(input())
P = []
for i in range(N):
    P += [int(input())]

ans=sum(P)-max(P)//2
print(ans)

Solution (Python):
N = int(input())
present = []

for i in range(N):
    p = int(input())
    present.append(p)

present.sort(reverse=True)
present[0] //= 2

print(sum(present))

Solution (Python):
import math
N=int(input())
x=[int(input()) for _ in range(N)]
total=0
x.sort()

for i in range(0,len(x)-1):
  total += x[i]
  
total += math.ceil(x[-1]/2)

print(total)

Solution (Python):
import sys
def input():
    return sys.stdin.readline()[:-1]
n=int(input())
p=[int(input()) for i in range(n)]

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

Solution (Python):
N=int(input())
p = [int(input()) for i in range(N)]
p.sort(reverse=True)
p[0]=p[0]/2
print('{:.0f}'.format(sum(p)))

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(N)]

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

Solution (Python):
N = int(input())
P = []
for _ in range(N):
    P.append(int(input()))

ans = sum(P) - max(P)*0.5
print(int(ans))

Solution (Python):
N = int(input())
cost_list = [int(input()) for n in range(N)]

max_cost = max(cost_list)
max_index = cost_list.index(max_cost)
cost_list.pop(max_index)
print(int((max_cost / 2) + sum(cost_list)))

Solution (Python):
N = int(input())
p = []
for i in range(N):
	p.append(int(input()))
p.sort()
p[-1] //= 2

print(sum(p))

Solution (Python):
p=[]
N=int(input())
for i in range(N):
  p.append(int(input()))
ans=sum(p)-(max(p)/2)
print(int(ans))

Solution (Python):
N = int(input())
P = [int(input()) for i in range(N)]

M = max(P)

S = sum(P)

print(S - int(M / 2))

Solution (Python):
n = int(input())
s_list = []
for i in range(n):
    s_list.append(int(input()))

s_list.sort()
s_list[n-1] = s_list[n-1]//2

print(sum(s_list))

Solution (Python):
import heapq
n = int(input())
p = []
for i in range(n):
    p.append(- int(input()))
heapq.heapify(p)
max = - heapq.heappop(p)
print(- sum(p) + max//2)

Solution (Python):
n = int(input())
p = [ int(input()) for _ in range(n) ]
p.sort(reverse=True)
ans = 0
for i in range(n):
  if(i == 0):
    ans += (p[i] // 2)
  else:
    ans += p[i]
print(ans)

Solution (Python):
n = int(input())
p = []
for i in range(n):
  pi = int(input())
  p.append(pi)
p.sort(reverse=True)
p[0] //= 2
print(sum(p))

Solution (Python):
N = int(input())
p=[]
for _ in range(N):
  p.append(int(input()))
print(int(sum(p))-int((max(p)/2)))

Solution (Python):
n = int(input())
p = sorted([int(input()) for _ in range(n)])
print(sum(p[0:n-1]) + (p[n-1] // 2))

Solution (Python):
n=int(input())
l=[int(input()) for i in range(n)]
print(sum(l)-int(max(l)/2))

Solution (Python):
n = int(input())
p_list = []
for i in range(n):
    p_list.append(int(input()))

x = int(max(p_list)/2)
ans = sum(p_list)-x
print(ans)

Solution (Python):
a = int(input())
p = [int(input()) for _ in range(a)]
list.sort(p, reverse=True)
print (sum(p) - max(p) // 2)

Solution (Python):
n = int(input())
prices = []
for _ in range(n):
	prices.append(int(input()))

prices.sort()

prices[n-1] = prices[n-1]//2

print(sum(prices))

Solution (Python):
banig = []
for x in range(int(input())):
  banig.append(int(input()))

sum = 0
big = max(banig)
banig.remove(big)
summation = 0
for e in banig:
  summation += e
print(summation + int(big/2))

Solution (Python):
n = int(input())
items = []
for i in range(n):
  items.append(int(input()))
result = str(sum(items)-max(items)/2)
print(result[:len(result)-2])

Solution (Python):
N = int(input())
A = [int(input()) for _ in range(N)]
print(sum(A) - max(A) // 2)

Solution (Python):
n=int(input())
p=[]
for i in range(n):
    p.append(int(input()))

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

Solution (Python):
N = int(input())
p = [int(input()) for i in range(N)]
print(int(sum(p) - max(p) / 2))

Solution (Python):
n = int(input())
p =[int(input())for i in range(n)]

m = max(p)//2
print(m+sum(p)-max(p))

Solution (Python):
N=int(input())
p=[]
for i in range(N):
    p.append(int(input()))
print(sum(p)-max(p)//2)

Solution (Python):
n = int(input())
p = [int(input()) for i in range(n)]
p.sort()
ans = sum(p) - int(p[n - 1]/2)
print(ans)

Solution (Python):
N=int(input())
P=[]
for i in range(N):
    P.append(int(input()))
print(int(sum(P)-max(P)/2))

Solution (Python):
n=int(input())
p=[]
for _ in range(n):
    p.append(int(input()))
print(sum(p)-max(p)//2)

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(N)]
print(sum(p) - int(max(p)/2))

Solution (Python):
N = int(input())
p = list(int(input()) for _ in range(N))
p.sort()
work = p.pop()
work = work // 2
p.append(work)
print(sum(p))

Solution (Python):
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
print(sum(a)-max(a)//2)

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
print(sum(p) - max(p)//2)

Solution (Python):
n = int(input())
p = []
for _ in range(n):
    p.append(int(input()))
print(sum(p)-max(p)//2)

Solution (Python):
p = [int(input()) for _ in range(int(input()))]
print(sum(p) - max(p)//2)

Solution (Python):
n = int(input())
P = [int(input()) for i in range(n)]

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

Solution (Python):
n = int(input())
p = sorted([int(input()) for _ in range(n)])
p[-1]//=2
print(sum(p))

Solution (Python):


import sys
import copy
import math

sys.setrecursionlimit(1000000)





N = int(input())
p = []
for i in range(N):
    x = int(input())
    p.append(x)

p.sort(reverse=True)
print(p[0] // 2 + sum(p[1:]))

Solution (Python):
def main():
    N=int(input())
    p_list=[int(input()) for i in range(N)]

    most_price = 0
    most_index = 0
    for i in range(len(p_list)):
        if p_list[i] > most_price:
            most_index = i
            most_price = p_list[i]
    
    result_price = 0
    for i in range(len(p_list)):
        if i == most_index:
            result_price = result_price + round(p_list[i]/2)
        else:
            result_price = result_price + p_list[i]

    print(result_price)

if __name__ == "__main__":
    main()

Solution (Python):
n = int(input())
pn = [int(input()) for _ in range(n)]

print(int(sum(pn) - max(pn)/2))

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy,copy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

def main():
    n=INT()
    p = [INT() for _ in range(n)]

    p_max = max(p)

    print(sum(p) - int((p_max/2)))

if  __name__=='__main__':
    main()

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
MOD = 10 ** 9 + 7

N = INT()
p = [INT() for _ in range(N)]

print(int(sum(p)-1/2*max(p)))

Solution (Python):
n=int(input())
p_ls=sorted(list(int(input()) for i in range(n)))
p_ls[n-1]=(p_ls[n-1])/2
print(int(sum(p_ls)))

Solution (Python):


N = int(input().split()[0])
p_list = []

for _ in range(N):
    p = int(input().split()[0])
    p_list.append(p)

p_list = sorted(p_list, reverse=True)
ans = p_list[0] // 2 + sum(p_list[1:])

print(ans)

Solution (Python):
n = int(input())
p = [int(input()) for i in range(n)]
p.sort()
p.reverse()
p[0] = p[0] // 2
print(sum(p))

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(N)]
print(int(sum(p)-max(p)/2))

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(N)]

p.sort()
max_p = p.pop(-1)

print(int(sum(p)+max_p/2))

Solution (Python):
N = int(input())
P = [int(input()) for _ in range(N)]
print(sum(P) - max(P)//2)

Solution (Python):
n = int(input())
s = 0
b = 0
for i in range(n):
  n = int(input())
  b = max(b, n)
  s += n
ans = s - b + b//2
print(ans)

Solution (Python):
N=int(input())
P=[int(input()) for i in range(N)]
print(sum(P)-int(max(P)/2))

Solution (Python):
p=[int(input()) for _ in range(int(input()))]
print(sum(p)-max(p)//2)

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
print(sum(p)-max(p)//2)

Solution (Python):
n=int(input())
p=[]
for i in range(n):
  p.append(int(input()))
print(sum(p)-max(p)//2)

Solution (Python):
n=int(input())
ans=0
m=0
for i in range(n):
  p=int(input())
  ans+=p
  if p>m:
    m=p
print(ans-m//2)

Solution (Python):
n=int(input())
m=0
t=0
v=0
for i in range(n):
  v=int(input())
  m=max(m,v)
  t+=v
print(t-m//2)

Solution (Python):
n = int(input())
L = [int(input()) for _ in range(n)]
L.sort()
print(sum(L[:-1])+L[-1]//2)

Solution (Python):
def slove():
    import sys
    input = sys.stdin.readline
    n = int(input().rstrip('\n'))
    p = [int(input().rstrip('\n')) for _ in range(n)]
    p.sort()
    print(sum(p[:-1]) + p[-1] // 2)


if __name__ == '__main__':
    slove()

Solution (Python):
l=[int(input()) for _ in range(int(input()))]
print(int(sum(l)-max(l)/2))

Solution (Python):
N = int(input())
P = [int(input()) for _ in range(N)]
maxP = max(P)
P.remove(maxP)
print(sum(P)+maxP//2)

Solution (Python):
n=int(input())
ans=0
m=0
for _ in range(n):
    a=int(input())
    ans+=a
    m=max(m,a)
print(int(ans-m//2))

Solution (Python):
N = int(input())
P = [int(input()) for i in range(N)]
P = sorted(P,reverse = True)

ans = P[0]//2
for i in range(1, N):
    ans += P[i]
    
print(ans)

Solution (Python):
n = int(input())
p = [ int(input()) for _ in range(n)]

p = sorted(p, reverse = True)

p[0] = int(p[0] /2)

sum = 0

for i in range(n):
  sum += p[i]
  
print(sum)

Solution (Python):
n=int(input())
p=[int(input()) for i in range(n)]
p.sort(reverse=True)
ans=sum(p)-p[0]//2
print(ans)

Solution (Python):
N=int(input())
P=[]
for i in range(N):
    P.append(int(input()))
print(sum(P)-max(P)//2)

Solution (Python):
n = int(input())
ans = 0
m = 0
for i in range(n):
  a = int(input())
  ans += a
  m = max(m, a)
  
print(ans - int(m/2))

Solution (Python):
import sys
from bisect import *
from collections import *
from copy import deepcopy
from datetime import *
from heapq import *
from itertools import *

from operator import *
from pprint import *

sys.setrecursionlimit(10**8)

input = sys.stdin.readline

def main():
    """ main """
    N = int(input())
    PS = [int(input()) for _ in range(N)]
    PS.sort()
    PS[-1] >>= 1
    print(sum(PS))

if __name__ == '__main__':
    main()

Solution (Python):
if __name__ == "__main__":
    N = int(input())
    data = []
    data = [int(input()) for _ in range(N)]
    print(int(sum(data)-max(data)/2))

Solution (Python):
n = int(input())
p = []
for _ in range(n):
    p.append(int(input()))
print(sum(p)-max(p)//2)

Solution (Python):
import sys
input = sys.stdin.readline


def main():
    N = int(input())

    ans = 0
    p_max = 0
    for _ in range(N):
        p = int(input())
        ans += p
        p_max = max(p_max, p)
    
    print(ans - p_max//2)


if __name__ == '__main__':
    main()

Solution (Python):
import sys

input = sys.stdin.readline


def main():
    n = int(input())
    p = sorted([int(input()) for _ in range(n)])
    print(p[-1] // 2 + sum(p[:-1]))


if __name__ == "__main__":
    main()

Solution (Python):
l=[int(input()) for _ in range(int(input()))]; print(sum(l)-int(max(l)/2))

Solution (Python):
n=int(input())
ls=[int(input()) for _ in range(n)]
x=max(ls)
ls.remove(x)
print(x//2+sum(ls))

Solution (Python):
n = int(input())
p =[int(input()) for i in range(n)]
p.sort(reverse =True)
p[0] = p[0]*0.5
print(int(sum(p)))

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
print(int(sum(p) - max(p)/2))

Solution (Python):
N,*p = map(int,open(0).read().split())
p.sort()
p[-1] /= 2
print(int(sum(p)))

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
answer = sum(p) - max(p) // 2
print(answer)

Solution (Python):
N = int(input())
items = [int(input()) for i in range(N)]
items.sort()
items[N - 1] //= 2
print(sum(items))

Solution (Python):
n = int(input())
ls = [int(input()) for _ in range(n)]

print(round(sum(ls)-(max(ls))/2))

Solution (Python):
N = int(input())
P = [int(input()) for _ in range(N)]

print(max(P) // 2 + sum(P) - max(P))

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
sum_p = sum(p) - int(max(p)/2)
print(sum_p)

Solution (Python):


n = input()
p = []
for i in range(n):
    p.append(input())


maxVal = 0
maxID = 0
for i in range(n):
    if p[i] >= maxVal:
        maxID = i
        maxVal = p[i]


sum = 0
for i in range(n):
    if i == maxID:
        p[i] /= 2

    sum += p[i]

print sum

Solution (Python):
n = int(input())
L = [int(input()) for i in range(n)]

print(int(sum(L) - max(L)/2))

Solution (Python):

N = int(input())
p = [int(input()) for i in range(N)]
print(int(sum(p) - max(p) / 2))

Solution (Python):
n = int(input())
l = [int(input()) for _ in range(n)]
print(sum(l) - max(l) // 2)

Solution (Python):


n = int(input())
p = ["" for _ in range(n)]

for i in range(n):
    p[i] = int(input())

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

Solution (Python):
n = int(input())

l = sorted([int(input()) for _ in range(n)])
    
print(sum(l) - l[n-1]//2)

Solution (Python):
N = int(input())
p_list = [int(input()) for _ in range(N)]
p_max = max(p_list)
p_list.remove(p_max)
p_list.append(int(p_max/2))

print(sum(p_list))

Solution (Python):
N = int(input())
price = []
for _ in range(N):
    price.append(int(input()))
price.sort(reverse=True)
print(int(sum(price)-(price[0])/2))

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]

max_price = max(p)
p.remove(max_price)

print(max_price // 2 + sum(p))

Solution (Python):
N=int(input())
p=[int(input()) for i in range(N)]
print(sum(p)-max(p)//2)

Solution (Python):
n = int(input())
ls = []
for i in range(n):
    p = int(input())
    ls.append(p)
    
ls[ls.index(max(ls))] = max(ls)/2
print(round(sum(ls)))

Solution (Python):
N = int(input())
p = [int(input()) for i in range(N)]
print(sum(p) - max(p) // 2)

Solution (Python):
n = int(input())

ans = 0
max_ = 0
for i in range(n):
    num = int(input())
    ans += num
    max_ = max(max_, num)

print(ans - max_//2)

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
p.sort()
print(sum(p[:n-1])+p[n-1]//2)

Solution (Python):
N = int(input())
p = [int(input()) for i in range(N)]
print(sum(p)-max(p)//2)

Solution (Python):
N=int(input())
l=[]
for n in range(N):
    l.append(int(input()))
print(sum(l)-max(l)//2)

Solution (Python):
N=int(input())
l=[]
for n in range(N):
    l.append(int(input()))
print(sum(l)-max(l)//2)

Solution (Python):

n=int(input())
p=[int(input()) for x in range(n)]
print(sum(p)-max(p)//2)

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
print(sum(p) - max(p)//2)

Solution (Python):
N = int(input())
L = [int(input()) for i in range(N)]
ans=0
ans =sum(L)-(max(L)//2)
print(ans)

Solution (Python):
n = int(input())
r = []
for i in range(n):
    p = int(input())
    r.append(p)
r.sort(reverse = True)
ans = r[0] // 2
r.append(ans)
r.remove(r[0])
print(sum(r))

Solution (Python):
l=[int(input()) for _ in range(int(input()))]
print(sum(l)-int(max(l)/2))

Solution (Python):
n, *p = map(int, open(0).read().split())
print(sum(p) - max(p)//2)

Solution (Python):
N = int(input())
p = sorted([int(input()) for _ in range(N)])[::-1]

sum = 0
for i in range(N):
    if i == 0:
        sum += int(p[i] / 2)
    else:
        sum += p[i]

print(sum)

Solution (Python):
N = int(input())
max_price = 0
sum_price = 0

for i in range(N):
    p = int(input())
    if max_price < p:
        max_price = p
    sum_price += p

ans = sum_price - (max_price // 2)
print(ans)

Solution (Python):
p = [int(input()) for _ in range(int(input()))]
print (sum(p) - int(max(p)/2))

Solution (Python):
n = int(input())
src = [int(input()) for _ in range(n)]
sorted_src = sorted(src)
sorted_src[-1] = sorted_src[-1]/2
print(int(sum(sorted_src)))

Solution (Python):
N = int(input())
P = [int(input()) for _ in range(N)]
P = sorted(P)
print(P.pop()//2+sum(P))

Solution (Python):
def MAP(): return list(map(int,input().split()))
def INT(): return int(input())
def FLOAT(): return float(input())
MOD = 10**9+7

n = INT()
p = [INT() for _ in range(n)]

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

Solution (Python):
n=int(input())
a=[int(input()) for i in range(n)]
s=max(a)
d=s//2
a.remove(s)
a.append(d)
print(sum(a))

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(N)]
print(sum(p) - max(p) // 2)

Solution (Python):
n=int(input())
p=[int(input())for i in range(n)]
print(sum(p)-max(p)//2)

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
print(sum(p) - max(p) // 2)

Solution (Python):
N = int(input())
P = [int(input()) for _ in range(N)]
P.sort()
print(int(sum(P[:-1]) + P[-1]/2))

Solution (Python):
N = int(input())
P = sorted([int(input()) for _ in range(N)])
print(sum(P[:N-1]) + P[-1]//2)

Solution (Python):
N = int(input())
P = []

for i in range(N):
    P.append(int(input()))

P.sort()

print(sum(P[0:-1:]) + P[-1] // 2)

Solution (Python):

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**6)

n = int(input())
p = [int(input()) for _ in range(n)]
print(sum(p)-max(p)//2)

Solution (Python):
n=int(input())
l=[input() for i in range(n)]
l=[int(j) for j in l]
l_s=sorted(l)
print(int(l_s[n-1]/2+sum(l_s[0:n-1])))

Solution (Python):
N=int(input())
List=[int(input()) for i in range(N)]
P=sum(List)-max(List)/2
print(int(P))

Solution (Python):
n = int(input())
l =[]
for i in range(n):
  l.append(int(input()))
print(int(int(sum(l)) - int(max(l))*0.5))

Solution (Python):
n=int(input())
p=sorted([int(input()) for _ in range(n)])
print(int(p.pop()/2)+sum(p))

Solution (Python):

n = int(input())
p = [int(input()) for _ in range(n)]
p.sort()
print(sum(p[:n-1])+p[n-1]//2)

Solution (Python):
n = int(input())

present = []
for _ in range(n):
    p = int(input())
    present.append(p)

present.sort()
ans = present.pop(-1) // 2
ans += sum(present)
print(int(ans))

Solution (Python):
N=int(input())

max=0
sum=0
for i in range(N):
  p=int(input())
  sum +=p
  if p >max:
      max=p
  a=max/2
  
print(int(sum-a))

Solution (Python):
if __name__ == '__main__':
    N = int(input())
    P = [int(input()) for _ in range(N)]
    P.sort(reverse=True)
    P[0] = P[0]//2
    print(sum(P))

Solution (Python):
N = int(input())
p = [0]*N
for i in range(N):
  p[i] = int(input())
ma = max(p)
ans = sum(p)-ma//2
print(ans)

Solution (Python):
n = int(input())
l = [int(input()) for i in range(n)]

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

Solution (Python):
n = int(input())
a = [int(input()) for i in range(n)]
print(sum(a) - max(a) // 2)

Solution (Python):
p = [int(input()) for _ in range(int(input()))]
print(int(sum(p)-0.5*max(p)))

Solution (Python):
n= int(input())
p= [int(input()) for _ in range(n)]
print(sum(p) - max(p) // 2)

Solution (Python):
price_list = [int(input()) for i in range(int(input()))]

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

Solution (Python):
N=int(input())
p=[]
for i in range(N):
  p.append(int(input()))
print(sum(p)-max(p)//2)

Solution (Python):
n = int(input())
prices = [int(input()) for _ in range(n)]

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

Solution (Python):
N = int(input())
value = [int(input()) for i in range(N)]
print(int(sum(value) - max(value)/2))

Solution (Python):
N = int(input())
P = []
for i in range(N):
  P.append(int(input()))
print(sum(P) - max(P) // 2)

Solution (Python):
N = int(input())

P = [int(input()) for _ in range(N)]


P.sort()


print(sum(P[0:N-1])+P[N-1]//2)

Solution (Python):
N=int(input())
p=[int(input()) for _ in range(N)]
print(sum(p) - max(p)//2)

Solution (Python):
n=int(input())
p=[int(input()) for i in range(n)]
q=sorted(p)
ans=sum(p)-q[-1]//2
print(ans)

Solution (Python):
n=int(input())
p=[int(input())for _ in range(n)]
ans=0

for i in range(n):
  ans+=p[i]
ans-=(max(p)/2)

print(int(ans))

Solution (Python):
N,*P=map(int,open(0));print(sum(P)-max(P)//2)

Solution (Python):
N,*P=map(int,open(0).read().split());print(sum(P)-max(P)//2)

Solution (Python):
n=int(input())
p=[int(input()) for i in range(n)]
print(sum(p) - max(p)//2)

Solution (Python):
p=[int(input()) for _ in range(int(input()))]
print(sum(p)-max(p)//2)

Solution (Python):
n = int(input())
p = [int(input()) for i in range(n)]
p.sort()
print(sum(map(int, p)) - p[-1]//2 )

Solution (Python):
l=[int(input()) for _ in range(int(input()))]
print(sum(l)-int(max(l)/2))

Solution (Python):
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
N=int(input())
pay=0
p=[int(input()) for _ in range(N)]

for i in range(N):
	pay+=p[i]

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

Solution (Python):
n = int(input())
out = [list(map(int,input().split())) for i in range(n)]
p=0
l=0
for i in range(n):
    p = p+out[i][0]
    a = int(out[i][0])
    l = max(l,a)
print(int(p-l/2))

Solution (Python):
n = int(input())
total = 0
soFar = 0
for i in range(n):
    p = int(input())
    total += p
    soFar = max(p, soFar)
print(int(total - soFar / 2))

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
print(sum(p) - max(p) // 2)

Solution (Python):
N  = int(input())
p = [int(input()) for i in range(N)]

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

Solution (Python):
N = int(input())
P = [int(input()) for _ in range(N)]
print(sum(P) - max(P) // 2)