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 = 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)]

m = max(p)
p.remove(m)
price = int(1/2*m) + sum(p)

print(price)

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

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

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

item.sort()
temp=sum(item)
temp=temp-item[n-1]/2
print(int(temp))

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

num = 0
for i in range(N):
  if i == N-1:
    num += int(0.5 * list[i])
  else:
    num += list[i]
    
print(num)

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

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

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


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

Solution (Python):

import sys


def solve(N: int, p: "List[int]"):
    ret = sum(p) - max(p) // 2
    print(ret)
    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())
li = [int(input()) for i in range(n)]
li.sort()
print(sum(li[:-1])+li[-1]//2)

Solution (Python):
n = int(input())
p = [int(input()) for i in range(n)]
max_p = max(p)
flag = False
for i in range(n):
    if p[i] == max_p and flag == False:
        p[i] = int(max_p/2)
        flag = True
print(sum(p))

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

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

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

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

Solution (Python):
N = int(input())
a = list()
for i in range(N):
  a.append(int(input()))
print(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):
N = int(input())

S = 0
M = 0
for i in range(N):
  amount = int(input())
  M = max(amount, M)
  S += amount

S -= M//2
print(S)

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

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

print(sum(p)-int(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):
def main():
    p =[]
    N = int(input())
    for i in range(N):
        p.append(int(input()))
    pmax = p.pop(p.index(max(p)))
    cost = pmax/2
    for i in p:
        cost += i
    print(int(cost))
main()

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

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

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007


def A():
    d = I()
    ans = [" Eve"]*(25-d)
    print("Christmas",end = "")
    for i in ans:
        print(i,end = "")
    print()
    return


def B():
    n = I()
    p = IR(n)
    s = sum(p)
    print(s-max(p)//2)
    return


def C():
    n,k = LI()
    h = IR(n)
    h.sort()
    ans = float("inf")
    for i in range(n-k+1):
        ans = min(ans,h[i+k-1]-h[i])
    print(ans)


def D():
    n,x = LI()
    l = [1 for i in range(n+1)]
    for i in range(n):
        l[i+1] = 2*l[i]+3
    p = [1 for i in range(n+1)]
    for i in range(n):
        p[i+1] = 2*p[i]+1
    ans = 0
    for i in range(1,n+1)[::-1]:
        if i == 1:
            if x == 5:ans += 3
            else:ans += max(0,x-1)
        else:
            if x == 0:continue
            if x == l[i]:
                ans += p[i]
                x = 0
            if x > l[i-1]+1:
                ans += p[i-1]+1
                x -= l[i-1]+2
            else:
                x -= 1
    print(ans)

def E():
    return


def F():
    return


def G():
    return


def H():
    return


if __name__ == "__main__":
    B()

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

Solution (Python):
n = int(input())
x = 0
y = 0
for i in range(n):
    p = int(input())
    if p > x:
        x = p
    y += p
print(y - x // 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=[0]*N
for i in range(N):
  p=int(input())
  l[i]=p
print(sum(l)-int(max(l)/2))

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

pi = sorted(pi)

pi[-1] = pi[-1] // 2

print(int(sum(pi)))

Solution (Python):

import sys


def solve(N: int, p: "List[int]"):
    p.sort(reverse=True)
    ans = int(p[0]/2)

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

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

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



p = sorted(p)

maxp = p.pop(-1)

ans = sum(p) + int(maxp / 2)

print(ans)

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

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

p = sorted([int(input()) for i in range(N)], reverse=True)

max_p = p[0]/2

ans = max_p + sum(p[1:])

print(int(ans))

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

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

price_list = []

for _ in range(n):
	price_list.append(int(input()))

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

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

ps.sort()
ps[-1] //= 2
ans = sum(ps)

print(ans)

Solution (Python):
n = int(input())
s =list()
for i in range(0,n):
  s.append(int(input()))
print(sum(s)-max(s)//2)

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

Solution (Python):


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

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

print(sum(p))

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

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

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

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

P.sort(reverse=True)

ans = 0
for i in range(len(P)):
  if i == 0:
    ans += int(P[0] / 2)
  else:
    ans += P[i]
    
print(ans)

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

def main():
    p_sum = 0
    p_max = -1
    for i in range(N):
        p = int(input())
        p_sum += p
        if p > p_max:
            p_max = p
    p_sum -= int(p_max/2)
    return p_sum

if __name__ == '__main__':
    print(main())

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)])
print(sum(p[:len(p)-1]) + p[-1] // 2)

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

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

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

  a.append(int(input()))
           
print(sum(a)-max(a)//2)

Solution (Python):
from sys import exit

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

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 = sorted([int(input()) for _ in range(N)])
print(sum(p) - p[-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 _ in range(N)]

mx_idx = 0
mx = 0
for i in range(N):
    if mx < p[i]:
        mx = p[i]
        mx_idx = i

tmp = p[mx_idx]
p[mx_idx] = tmp * (1 / 2)
print(int(sum(p)))

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

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

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

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

Solution (Python):
N=int(input())
ps=[int(input()) for _ in range(N)]
ps_sort = sorted(ps, reverse=True)
s=0
for i, p in enumerate(ps_sort):
    if i == 0:
        s += p // 2
    else:
        s += p
print(s)

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

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

max = p.index(max(p))

p[max] = p[max] // 2
print(sum(p))

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

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

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

Solution (Python):
import sys
n=int(input())
p=[int(i) for i in sys.stdin]
p.sort()
ans=p.pop()//2
print(sum(p)+ans)

Solution (Python):
import sys
n=int(input())
p=[int(i) for i in sys.stdin]
p.sort()
ans=p.pop()//2
print(int(sum(p))+ans)

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

Solution (Python):
N = int(input())
P = [int(input()) for _ in range(0, N)]
P[P.index(max(P))] *= 0.5
print(int(sum(P)))

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

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

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

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())
S=0 
A=0
for i in range(N) :
  B=int(input())
  S = S + B
  if A<B :
    A=B
print(int(S-A/2))

Solution (Python):
N = int(input())
prices = []
for i in range(N):
  prices.append(int(input()))
                
max_price_idx = prices.index(max(prices))
total = int(sum(prices[:max_price_idx]) + max(prices)/2 + sum(prices[max_price_idx+1:]))                
print(total)

Solution (Python):

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

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

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

l = list()
for i in range(a):
    l.append(int(input()))

l.sort()
ans = int(l.pop(len(l) - 1)/2)
ans += sum(l)

print(ans)

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

p = sorted(p)

print(int(sum(p) - p[-1]/2))

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

Solution (Python):


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

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

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

Solution (Python):
import numpy as np

N = int(input())
price = []

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

price = np.array(price)
max_index = np.argmax(price)

print(int(np.sum(price) - price[max_index] / 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 = int(input())
  P.append(p)
P.sort()

ans = 0
ans += P.pop(-1)//2
ans += sum(P)
print(ans)

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

Solution (Python):
N=int(input())
S=0
M=0
for i in range(N):
    price=int(input())
    S+=price
    M=max(M,price)
ans=int(S-M/2)
print(ans)

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

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

p = sorted(p)

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

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

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(int(sum(a)))

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

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

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

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

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

Solution (Python):


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

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

Solution (Python):
N = int(input())
D = []
for i in range(1, N + 1):
    pi = int(input())
    D.append(pi)
a = max(D)
b = sum(D)
ans = int(a / 2 + b - a)
print(ans)

Solution (Python):
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip() for _ in range(n)]
data = [int(l) for l in data]
data.sort()
data[-1] = int(data[-1]/2)
print(sum(data))

Solution (Python):
import sys
import math



def loading_inputs():

    data = {"N":0, "S":list()}
    N = raw_input()
    N = int(N)

    P = list()
    for i in xrange(N):
        p_i = raw_input()
        p_i = int(p_i)
        P.append(p_i)

    data["N"] = N
    data["P"] = P

    return data


def calc_payment(max_p, p_remain):

    total = 0

    max_pay = math.ceil(max_p/2)
    remain_pays = sum(p_remain)
    total = int(max_pay + remain_pays)
    return total



def main():

    ans  = 0
    inputs = loading_inputs()
    P = sorted(inputs["P"])
    N = inputs["N"]

    max_p    = P[N-1]
    remain_p = P[:N-1]
    ans = calc_payment(max_p, remain_p)
    print ans



if __name__ == "__main__":
    main()

Solution (Python):
N=int(input())
l=[int(input()) for i in range(N)]
print(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):
def ans():
  N = int(input())
  P = sorted([int(input()) for _ in range(N)])
  print(sum(P[:-1])+P[-1]//2)
ans()

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

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

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

Solution (Python):

n = int(input())
p = []
for _ in range(n):
    p.append(int(input()))
p.sort()
p[-1] = int(p[-1] * 0.5)
print(sum(p))

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

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

Solution (Python):
def christmas_eve_eve(N: int, P: list) -> int:
    p_max = max(P)
    return sum(P) - (p_max // 2)


if __name__ == "__main__":
    N = int(input())
    P = [int(input()) for _ in range(N)]
    ans = christmas_eve_eve(N, P)
    print(ans)

Solution (Python):
N, = (int(x) for x in input().split())
p_arr = []
for _ in range(N):
    p_arr.append(int(input()))

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

ans = 0
for p in p_arr:
    ans += p

print(ans)

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

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

v_list = []
for _ in range(N):
  v_list.append(int(input()))
  
v_list.sort(reverse=True)
print(v_list[0]//2 + sum(v_list[1:]))

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

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

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

p.sort(reverse=True)

ans = p[0] // 2

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

print(ans)

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

max_p = max(pi)
ans = sum(pi) - max_p + max_p // 2
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 = [int(input()) for _ in range(N)]
p = sorted(p)
print(sum(p[:]) - p[-1]//2)

Solution (Python):
N = int(input())
item = [int(input()) for _ in range(N)]
print(int(sum(item) - max(item)/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())
list = [int(input()) for i in range(N)]
list.sort(reverse=True)

total = list[0]/2

for i in list[1:]:
    total += i

print(int(total))

Solution (Python):
N = int(input())
pLs=[]
for n in range(0,N):
    pLs.append(int(input()))

pLs.sort(reverse = True)

sm = 0
pLs[0] = int(pLs[0]/2)
for n in range(0,N):
    sm += pLs[n]

print(sm)

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

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

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

Solution (Python):
import numpy as np

N = int(input())
ps = np.zeros(N)

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

SUM = ps.sum() - ps.max()/2
print(int(SUM))

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

psum = sum(ps) - int(max(ps) / 2)
print(psum)

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

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

Solution (Python):
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))

N=ri()
p=[0]*N
for i in range(N):
    p[i] = ri()

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

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

Solution (Python):
N = int(input())
highest = 0
sum = 0
for i in range(N):
  x = int(input())
  sum += x
  if x >= highest:
    highest = x
print(sum - (highest)//2)

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

Solution (Python):
n=int(input())
price=[]
for i in range(n):
    price.append(int(input()))
print(sum(price)-max(price)//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 _ in range(n)]

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

Solution (Python):
_,*a=map(int,open(0).readlines());print(sum(a)-max(a)//2)

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

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

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

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

Solution (Python):
n = int(input())
i = 0
N = []
while i < n:
  N.append(int(input()))
  i += 1
  
mep = max(N)
idm = N.index(mep)
N[idm] = mep /2

price = sum(N)
price = int(price)

print(price)

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

Solution (Python):
import math

N = int(input())
p = []
total = 0

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

p = sorted(p)
p[N - 1] = math.floor(p[N - 1] / 2)

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

print(total)

Solution (Python):
_,*p=map(int,open(0).readlines());print(sum(p)-max(p)//2)

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

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

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

price = []

for i in range(N):
  price.append(int(input()))
               
price.append(max(price)/2)

print(int(sum(price)-max(price)))

Solution (Python):

n=int(input())

ar=[]
for i in range(0,n):
	k=int(input())
	ar.append(k)

ar.sort()
k=ar[n-1]//2
for i in range(0,n-1):
	k+=(ar[i])
print(k)

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

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

p = [int(input()) for _ in range(N)]
maxp = max(p)
print(int(sum(p) - maxp*0.5))

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

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

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

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

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

Solution (Python):
import numpy as np
N = int(input())
p = []
for i in range(N):
    p.append(int(input()))
p = np.array(p)
index  = np.argmax(p)
p[index] = p[index]/2
print(int(sum(p)))

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

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

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

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=[]
for i in range(n):
    a.append(int(input()))
    
a.sort(reverse=True)
print(int(sum(a)-a[0]/2))

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

Solution (Python):


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

max_val = max(p)
max_ind = p.index(max_val)
p[max_ind] = p[max_ind]/2

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

print(int(sum))

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)]
ans = sum(p)-max(p)/2
print(int(ans))

Solution (Python):
N=int(input())
ListP=[]
S=0
for i in range(1,N+1,1):
  pi=int(input())
  S+=pi
  ListP.append(pi)
  
PM=int((max(ListP))/2)
S-=PM
print(S)

Solution (Python):

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


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

print(ans)

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

price.sort()
total_price = sum(price[0:N-1]) + int(price[-1]/2)

print(total_price)

Solution (Python):






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





sorted_p = sorted(p)
print(sum(sorted_p[:-1]) + int(sorted_p[-1]/2))

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

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

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

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

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

max_price = 0
sum_price = 0

for _ in range(n):
  p = int(input())
  if max_price < p:
    max_price = p
  sum_price += p

print(sum_price - max_price // 2)

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

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

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

list_std = sorted(list)

highest = list_std[n-1]
highest //= 2
price = 0

for j in range(n-1):
    price += list_std[j]

print(int(highest+price))

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

maxP = max(P)
sumP = 0
for i in range(N):
    sumP += P[i]

print(sumP-maxP//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())
a = [int(input()) for i in range(n)]
rich = a[0]
for i in range(1,n):
    if a[i] > rich:
        rich = a[i]
print(sum(a) - rich//2)

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

pmax = p.index(max(p))

p[pmax] /= 2

print(int(sum(p)))

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 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())
l = []
sum = 0

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

l.sort(reverse=True)
sum += l[0] / 2

for j in l[1:]:
    sum += j

print(int(sum))

Solution (Python):
from functools import reduce
from operator import add
n = int(input())

p = []

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

sp = sorted(p, reverse=True)

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

ans = reduce(add, sp)
print(ans)

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

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

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

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 = [int(input()) for i in range(n)]

m = max(p)
p.remove(m)
p.append(m / 2)

print("%d" % sum(p))

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

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

p.sort(reverse=True)
p[0] /= 2
sum = 0
for i in p:
    sum += i

print(math.floor(sum))

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