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):
N, *d = map(int, open(0).read().split())
print(int(sum(d)-max(d)/2))

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

Solution (Python):
n = int(input())
li = list(int(input()) for _ in range(n))
print(sum(li) - max(li) // 2)

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

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

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

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())

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

p = sorted(p, reverse=True)
p[0] = p[0] // 2

total = 0
for value in p:
  total = total + value

print(total)

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

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

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

Solution (Python):
Row=int(input()) 
List=sorted([int(input()) for i in range(Row)])

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

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

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

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

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

print(ans)

Solution (Python):
n = int(input())
ans = 0
d = 0
for _ in range(n):
    p = int(input())
    ans += p
    d = max(d, p // 2)

print(ans - d)

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=[int(input()) for i in range(n)]
print(sum(p)-max(p)//2)

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

Solution (Python):

import sys


def solve(N: int, P: "List[int]"):
    P.sort(reverse=True)
    print(int(P[0]/2 + sum(P[1:])))

    return



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):
n = int(input())
sum = 0
m = 0
for i in range(n):
    p = int(input())
    sum += p
    m = max(p, m)
sum -= m/2
print(int(sum))

Solution (Python):
n=int(input())
p=[int(input())for i in range(n)]
maxp=p.pop(p.index(max(p)))
ans=0
for i in p:
  ans=ans+i
ans=ans+maxp//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())
p=[int(input())for i in range(n)]
maxp=p.pop(p.index(max(p)))
ans=0
for i in p:
  ans=ans+i
ans=ans+maxp//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())
amnt = []
for i in range(N):
  amnt.append(int(input()))
print(int(sum(amnt)-max(amnt)/2))

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 _ in range(n)]

P.sort()
print(int(P[n-1]/2) + sum(P[:n-1]))

Solution (Python):


n = int(input())

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

print(x)

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

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

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

Solution (Python):
import sys


def input():
    return sys.stdin.readline()[:-1]









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

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

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

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

print(ans)

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

p.sort(reverse = True)

ans = 0
for i in range(N):
    if i == 0:
        ans += int(p[i]/2)
    else:
        ans += p[i]
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())
p=[]
for _ in range(n):
    p.append(int(input()))
print(sum(p)-max(p)//2)

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

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

Solution (Python):
from __future__ import print_function
import numpy as np
import sys
import math,string,itertools,fractions,heapq,collections,re,array,bisect,copy,functools


import random

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)

n = int(input())
p = np.zeros(n, dtype = int)
for i in range(n):
    p[i] = int(input())

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

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

def main():
    p = [int(input()) for _ in range(N)]
    p.sort(reverse=True)
    print(sum(p) - p[0] // 2)

if __name__ == '__main__':
    main()

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

Solution (Python):
a = int(input())
list1 = [int(input()) for i in range(a)]
num = max(list1) / 2
list1.remove(max(list1))
print(int(sum(list1)+num))

Solution (Python):

n = int(input())
price_list = []
for i in range(n):
    price = int(input())
    price_list.append(price)
max_price = max(price_list)
price_list.remove(max_price)
price_list.append(max_price/2)
print(int(sum(price_list)))

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

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

Solution (Python):


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

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

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

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

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

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

list=[]

for i in range(n):
  list.append(int(input()))
  
print(int(sum(list)-max(list)/2))

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

Solution (Python):
n=int(input())
p_list=[]

for i in range(n):
  p_list.append(int(input()))

p_list.sort()
p_list.reverse()

p_list[0] = p_list[0] // 2

print(sum(p_list))

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

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

N = int(input())
L = [int(input()) for _ in range(N)]
ma = max(L)

s = 0
f = True
for v in L:
    if ma == v and f:
        f = False
        s += v // 2
    else:
        s += v
        
print(s)

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

Solution (Python):
N=int(input())
a=[]
T=0
for i in range(N):
    a.append(int(input()))
    max(a)
    X=max(a)/2
    X=int(X)
    T+=a[i]
print(T-X)

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

Solution (Python):
n = int(input())
p = []
ans = 0
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 _ in range(N)]

max_value = max(p)
p.remove(max_value)

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

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(sum(p)-max(p)//2)

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

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

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

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

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

p_max = max(p)
p_sum = sum(p) - p_max
p_max *= 0.5

print(int(p_sum + p_max))

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

s_p = sorted(p)

total = 0
for i in range(N-1):
    total = total + s_p[i]

total = total + int(s_p[N-1]/2)

print(total)

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

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

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

max_p = max(p)
ans = sum(p) - max_p / 2
print(int(ans))

Solution (Python):
N = int(input())
p = [int(input()) for n 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 =[0]
for i in range(n):
    a = int(input())
    if a > p[0]:
      p.insert(0, a)
    else:
      p.append(a)
      
p[0] //= 2

print(sum(p))

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

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

Solution (Python):
import numpy as np
n = int(input())
arr = [int(input()) for _ in range(n)]
arg_m = np.argmax(arr)
total = (arr.pop(arg_m)//2) + sum(arr)
print(total)

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

total = max(item) / 2 + sum(item) - max(item)
print(round(total))

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

Solution (Python):

n = int(input())
A = []
A = [int(input()) for i in range(n)]
s = 0
s += sum(A) - max(A)/2
print(int(s))

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

Solution (Python):
import functools
from operator import add
N = int(input())
A = [int(input()) for i in range(N)]

A_max = max(A)
A.remove(A_max)
A.append(A_max//2)

print(functools.reduce(add,A))

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

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

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

print(ans)

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

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


S = int(max(products) / 2)
index = products.index(max(products))
products.pop(index)
S += sum(products)
print(S)

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

p[p.index(max(p))] /= 2
print(int(sum(p)))

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

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

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

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

p.sort()
ans = p[-1] // 2 + sum(p[:-1])
print(ans)

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

ans = 0
for i in range(N):
    if p[i] == max(p):
       ans += int(p[i]/2)
       p.append(max(p) + 1)
    else:
        ans += p[i]

print(ans)

Solution (Python):
cnt=0
N=int(input())
p=[]
import sys
for i in sys.stdin.readlines():
  p.append(int(i.rstrip()))
p.sort(reverse=True)
p[0]=p[0]/2
print(int(sum(p)))

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

Solution (Python):
N = int(input())
sum = 0
max_value = 0
for i in range(N):
    tmp = int(input())
    sum += tmp
    max_value = max(max_value, tmp)

print('{0:.0f}'.format(sum - max_value / 2))

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

Solution (Python):
from sys import stdin
import numpy as np

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

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

print(int(ans))

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)]
m = max(p)//2
p[p.index(max(p))] = 0
print(sum(p)+m)

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

L = []

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

sale = int(max(L) / 2)
sum = 0

for i in L : 
    sum += i
    
sum -= sale

print(sum)

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

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

current = 0
curmax = -1

for _ in range(N):
    item = int(input())

    current += item
    curmax = max(curmax, item)


current -= int(curmax / 2)

print(current)

Solution (Python):
import numpy as np
kosuu = int(input())
kakakulist=[]
for i in range(kosuu):
  kakaku=int(input())
  kakakulist.append(kakaku)

saidai=max(kakakulist)

kotaesyou=sum(kakakulist)-saidai/2
kotae=round(kotaesyou)

print(kotae)

Solution (Python):
n = int(input())
l = []

for i in range(n):
    l.append(int(input()))

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

Solution (Python):
n=int(input())
A=[int(input()) for i in range(n)]
cnt=0

for i in range(n):
  cnt+=A[i]
cnt-=max(A)*0.5
print(int(cnt))

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())
s = 0
m = 0
for i in range(N):
  inline = int(input())
  s += inline
  m = max(m, inline)
print(int(s-(m/2)))

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

Solution (Python):

import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(N: int, p: "List[int]"):
    p.sort()
    return sum(p[:-1]) + (p[-1] // 2)


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) ]  
    result = solve(N, p)
    print(result)

if __name__ == '__main__':
    main()

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

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

Solution (Python):
N = int(input())
pLst = [0] * N
for i in range(N):
    pLst[i] = int(input())

ans = 0
pLst.sort(reverse=True)
for i in range(1, N):
    ans += pLst[i]

ans += int(pLst[0] / 2)
print(ans)

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())
Prices = sorted([int(input()) for i in range(N)] ,reverse = True)
print(Prices[0]//2 + sum(Prices[1:]))

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

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

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

d = max(a) / 2

print(int(sum(a) - d))

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

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

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

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

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

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

m = max(p)
sum = 0
for j in range(n):
    sum += p[j]

print(int(sum - m/2))

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

for i in range(n):
    x = int(input())
    p.append(x)
    
p.sort()
print(int(sum(p) - max(p)*0.5))

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

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

for i in range(N):
  pi = int(input())
  P_list.append(pi)
print(int(sum(P_list)-max(P_list)/2))

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

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

p = le = [int(input()) for i in range(N)]

mxp = max(p)

answer = sum(p)-mxp//2

print(answer)

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

Solution (Python):
n = int(input())
prices = []
for _ in range(n):
    price = int(input())
    prices.append(price)
prices.sort()
print(sum(prices[:-1]) + prices[-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())
p = [int(input()) for i 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())
P = [int(input()) for i in range(N)]
X = max(P)
P.remove(X)
T = X / 2
for j in range(N - 1):
    T += P[j]

T = int(T)
print(T)

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

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

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

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

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

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

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

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

Solution (Python):
N = int(input())
P = [int(input()) for i in range(N)]
maxprice = max(P)
sum = 0
ticket = True
for i in P:
    if(i != maxprice):
        sum += i
    elif(ticket):
        sum += i / 2
        ticket = False
    else:
        sum += i
print(int(sum))

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

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

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

Solution (Python):

n = int(input())
lst = sorted(list(map(int, [input().rstrip() for _ in range(n)])))
print(sum(lst) - lst[-1] // 2)

Solution (Python):
N = int(input())
p = []
for _ in range(N):
  p.append(int(input()))
p = sorted(p)
p[N-1] = p[N-1] / 2
print(int(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 i in range(N):
    P.append(int(input()))

P.sort()
P[N-1]=int(P[N-1]/2)

print(sum(P))

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())

lists=[]
for i in range(N):
    lists.append(int(input()))
print(int(sum(lists)- 0.5 * max(lists)))

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

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

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

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

Solution (Python):
N = int(input())
list1 = [0]*N
for i in range(N):
  list1[i] = int(input())
list1 = sorted(list1, reverse=True)
list1[0] = list1[0] // 2

print(sum(list1))

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

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

buy.sort(reverse=True)

ans = 0
ans -= buy[0]
ans += buy[0]//2
for b in buy:
    ans += b

print(ans)

Solution (Python):
N = int(input())
max_p = 0
sum = 0
for i in range(N):
  pi = int(input())
  sum += pi
  max_p = max(max_p, pi)
  
ans = int(sum - max_p / 2)
print(ans)

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

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

b.sort()

b[-1] = b[-1] / 2

print(int(sum(b)))

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

Solution (Python):
N = int(input())
nums = []
for i in range(N):
    nums.append(int(input()))
m = max(nums)
nums.remove(m)
print(int(sum(nums) + (m / 2)))

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

plist.sort()

ssum = 0
for p in plist[:-1]:
    ssum += p
ssum += plist[-1] // 2
print(ssum)

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

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

p.sort()
p.reverse()
kane = 0
for i, j in enumerate(p):
    if i == 0:
        kane += int(j * 1/2)
    else:
        kane += j
        
print(kane)

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

m = max(nums)
nums.remove(m)
print(int(sum(nums) + (m / 2)))

Solution (Python):


n = int(input())

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

p.sort(reverse=True)

print(sum(p) - p[0] // 2)

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

p.sort(reverse=True)

print(sum(p) - p[0] // 2)

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

Solution (Python):


n = int(input())

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

p.sort(reverse=True)

print(sum(p) - p[0] // 2)

Solution (Python):
n,*p=map(int,open(0).read().split());s=sorted(p);print(sum(s[:-1]+[s[-1]//2]))

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

array.sort()
array[-1] = max(array) // 2
total = sum(array)

print(total)

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

Solution (Python):

def main():
    a = int(input())
    data = [int(input()) for i in range(a)]
    data.sort()
    data[-1] = data[-1] // 2
    print(sum(data))


if __name__ == '__main__':
    main()

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

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

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

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

half = p.pop(p.index(max(p)))/2
sum = 0

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

print(int(half + sum))

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

print(round(sum(P) - (P[0] / 2)))

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

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

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
p.sort()
print(sum(p) - p[-1] // 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 = [0] * n

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

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

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

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

Solution (Python):

import sys
INF = float("inf")


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


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):
import sys

def main(inp):
    N = int(next(inp))
    P = sorted([int(next(inp)) for _ in range(N)],reverse=True)
    P[0]=int(P[0]/2)
    
    return sum(P)
  
print(main(sys.stdin))

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

P.sort(reverse=True, key=int)
P[0] = P[0]//2

for num in range(N):
	S += P[num]

print(S)

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

p.sort(reverse=True, key=int)

p[0] = p[0]//2

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

print(sum)

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

M = int(max(P))

print(int(sum(P) - M + M/2))

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

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

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

print(s)

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

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

Solution (Python):
N = int(input())
a = [int(input()) for i in range(N)]
MAX_PRICE = max(a)

SUM = sum(a) - MAX_PRICE/2

print(int(SUM))

Solution (Python):
n=int(input())
p=sorted([int(input()) for _ in range(n)], reverse=True)
p[0] //= 2
print(sum(p))

Solution (Python):
N = int(raw_input())
lst = []
for i in range(0, N):
	lst.append(int(raw_input()))
lst.sort()
sum = 0
for i in range(0, N):
	price = lst[i]
	if i == N-1: price = price / 2
	sum += price

print sum

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

print(int(sum(p)))

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()))]
P.sort(reverse=1)
print(sum(P)-(P[0]//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 i in range(N)]

p.sort(reverse=True)
total = 0

total += (p[0] // 2)

for i in range(1, N):
    total += p[i]

print(total)

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

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

a = []
for i in range(n):
    b = int(input())
    a.append(b)
    
a = sorted(a)
b = a.pop(-1)
c = b /2
a.append(c)

print(int(sum(a)))

Solution (Python):
_,*p=map(int,open(0));print(sum(p)-max(p)//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())
s = []
for i in range(n):
  x = int(input())
  s.append(x)
s = sorted(s)
s[-1] = s[-1]//2
print(sum(s))

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

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 = []
for i in range(N):
  P.append(int(input()))
print(sum(P) - max(P) // 2)

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

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

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

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

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

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

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

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

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

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

Solution (Python):
def main():
	n = int(input())
	total = 0
	max_val = 0
	for i in range(n):
		p = int(input())
		total += p
		if p > max_val:
			max_val = p
	total -= max_val//2
	print(total)

if __name__ == '__main__':
    main()

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

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

a.sort()

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

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

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

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

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

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

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

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

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


print(int(sum(p)-max(p)*0.5))