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


data = int(input())

array = [int(input()) for i in range(data)]

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

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

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

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

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

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

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

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

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


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


if __name__ == '__main__':
    main()

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

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

ans = 0
for i in range(n):
    if i == max_suffix: ans += p[i]/2
    else: ans += p[i]
    
print(int(ans))

Solution (Python):
import sys
import os
import math

ii = lambda: int(sys.stdin.buffer.readline().rstrip())
il = lambda: list(map(int, sys.stdin.buffer.readline().split()))
fl = lambda: list(map(float, sys.stdin.buffer.readline().split()))
iln = lambda n: [int(sys.stdin.buffer.readline().rstrip()) for _ in range(n)]

iss = lambda: sys.stdin.buffer.readline().decode().rstrip()
sl = lambda: list(map(str, sys.stdin.buffer.readline().decode().split()))
isn = lambda n: [sys.stdin.buffer.readline().decode().rstrip() for _ in range(n)]

MOD = 10 ** 9 + 7


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    P = sorted([ii() for _ in range(ii())])[::-1]
    print(sum(P[:1]) // 2 + sum(P[1:]))


if __name__ == '__main__':
    main()

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

Solution (Python):

from collections import defaultdict,deque
from heapq import heappush, heappop
from bisect import bisect_left, bisect_right
import sys, random, itertools, math
sys.setrecursionlimit(10**5)
input = sys.stdin.readline
sqrt = math.sqrt
def LI(): return list(map(int, input().split()))
def LF(): return list(map(float, input().split()))
def LI_(): return list(map(lambda x: int(x)-1, input().split()))
def II(): return int(input())
def IF(): return float(input())
def S(): return input().rstrip()
def LS(): return S().split()
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float("INF")


def solve():
    n = II()
    p = IR(n)
    print(sum(p) - max(p) // 2)
    return



if __name__ == '__main__':
    solve()

Solution (Python):
N = int(input())
num = N+1
price = []
for i in range (1,num):
  price.append(int(input()))
else:
  exp = max(price)//2
  total = sum(price) - exp
  print(total)

Solution (Python):
n=int(input())
l=[]
for i in range(n):
    a =input()
    l.append(int(a))
lm=sorted(l)
lm2=lm[0:n-1]
b=lm[-1]
print(sum(lm2)+int(b)//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):
import sys
input = lambda: sys.stdin.readline().rstrip()

N = int(input())

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

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

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

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

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

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

p.sort(reverse=True)

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

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

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

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

Solution (Python):

url = "https://atcoder.jp//contests/abc115/tasks/abc115_b"

def main():
    n = int(input())
    t = [int(input()) for i in range(n)]
    ind = t.index(max(t))
    t[ind] = t[ind] // 2
    print(sum(t))


if __name__ == '__main__':
    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 =[]
for i in range(n):
    a =int(input())
    p.append(a)
p.sort()
new_p =p[n-1]/2
ans =sum(p[:n-1])+new_p
print(int(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 = sorted([int(input()) for i in range(n)])
ans = sum(P[:-1]) + (P[-1] // 2)
print(ans)

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

Solution (Python):
n = int(input())
ma = 0
ans = 0
for _ in range(n):
    p = int(input())
    if ma < p:
        ans += ma
        ma = p
    else:
        ans += p
ans += ma // 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=[]
for i in range(n):
    p.append(int(input()))
p=sorted(p,reverse=True)
print(sum(p[1:n])+p[0]//2)

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

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

print(sum(p))

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):
a = int(input())
b_list =[]
for i in range(a):
    b = int(input())
    b_list.append(b)
    
print(int(sum(b_list) - 0.5*max(b_list)))

Solution (Python):
n = int(input())
ma = 0
ans = 0
for i in range(n):
    p = int(input())
    ma = max(p,ma)
    ans+=p
print(ans -ma//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)]

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

print(ans)

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

Solution (Python):
n=int(input())
p=[0]*n
t=0
for i in range(n):
  p[i]=int(input())
  t+=p[i]
s=max(p)
t-=s//2
print(t)

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

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

Solution (Python):
def main():
  n = int(input())
  
  
  
  
  a = [int(input()) for i in range(n)]
  
  
  ans = 0
  count = 0
  lis = []
  b = sorted(a)
  
  for i in range(n):
    ans += a[i]
  print(ans-b[-1]//2)
  

if __name__ == '__main__':
  main()

Solution (Python):
a = []
for i in range(int(input())):
    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):

import sys
read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 7)

n = int(readline().rstrip())
p = [int(readline().rstrip()) for i in range(n)]
print(sum(p) - max(p) // 2)

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

tmp = sorted(p,reverse=True)
print(tmp[0]//2 + sum(tmp[1:]))

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())
ans = 0

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

ans = sum(p) - p[n - 1]//2

print(ans)

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

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 = []
for _ in range(N):
    pi = int(input())
    P.append(pi)

print(int(sum(P)-max(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 _ in range(N):
    p.append(int(input()))
print(sum(p)-max(p)//2)

Solution (Python):


import sys
import math
from bisect import bisect_right as br
from bisect import bisect_left as bl
sys.setrecursionlimit(2147483647)
from heapq import heappush, heappop,heappushpop
from collections import defaultdict
from itertools import accumulate
from collections import Counter
from collections import deque
from operator import itemgetter
from itertools import permutations
mod = 10**9 + 7
inf = float('inf')
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))

n = I()
p = [I() for _ in range(n)]
s = sum(p)
ans = s - max(p)//2
print(ans)

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

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

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

Solution (Python):










"""def kiri(n,m):
  r_ = n / m
  if (r_ - (n // m)) > 0:
    return (n//m) + 1
  else:
    return (n//m)"""
 
def main():
  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,len(P)):
    ans += P[i]
  print(ans)
  
if __name__ == '__main__':
  main()

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

Solution (Python):
n=int(input())
pn=[]
for i in range(n):
    pi=int(input())
    pn.append(pi)
ans=sorted(pn,reverse=True)
an=0
for i in range(n-1):
    an+=ans[i+1]
print((ans[0]//2)+an)

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

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

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

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

Solution (Python):
l = [int(input()) for _ in range(int(input()))]
m = max(l) // 2
sl = sorted(l)
sl.pop()
sm = sum(sl)
print(sm + m)

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

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

    print(p[0] // 2 + sum(p[1:]))
if __name__ == '__main__':
    solve()

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

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

Solution (Python):
def ii():return int(input())
def iim():return map(int,input().split())
def iil():return list(map(int,input().split()))
def ism():return map(str,input().split())
def isl():return list(map(str,input().split()))

n = ii()
prices = []
for i in range(n):
    prices.append(ii())

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

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

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

max_price = max(price)
price.remove(max_price)
print(int(sum(price) + max_price//2))

Solution (Python):
def main():
    from builtins import int, map, list, print, max
    import sys
    sys.setrecursionlimit(10 ** 6)

    input = sys.stdin.readline
    input_list = (lambda: input().rstrip().split())
    input_number = (lambda: int(input()))
    input_number_list = (lambda: list(map(int, input_list())))

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


if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
INF = 10 ** 11
MOD = 10 ** 9 + 7
from collections import deque
sys.setrecursionlimit(100000000)
from heapq import heapify,heappush,heappop   

def main():
    n = int(input())
    p = [int(input()) for _ in range(n)]
    p.sort()
    ans = 0
    for i in range(n - 1):
        ans += p[i]
    ans += p[-1]//2
    print(ans)
if __name__=='__main__':
    main()

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

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

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

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

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

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

Solution (Python):
n = int(input())
max = 0
sum = 0


for i in range(n):
	data = input()

	data = int(data)

	if max < data:
		max = data
	sum = sum + data
print(sum - max//2)

Solution (Python):
import sys
from bisect import *
from heapq import *
from collections import *
from itertools import *
from functools import *
from math import *
from fractions import *

sys.setrecursionlimit(100000000)
input = lambda: sys.stdin.readline().rstrip()

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

main()

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

for i in range(N):
    li.append(int(input()))
    
li2 = sorted(li,reverse=True)
li2[0] = li2[0]/2

print(int(sum(li2)))

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

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

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

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

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

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

Solution (Python):

N = int(input().strip())
ps = [int( input().strip() ) for _ in range(N)]

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

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

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

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

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

list_P.sort()
list_P[-1] = list_P[-1]//2
print(sum(list_P))

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

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

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

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

nax = max(p)

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

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

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

ret = sum(P)
print(ret)

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

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

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

p=sorted(p)
answer=0

for i in range(N-1):
    answer+=p[i]

answer+=p[N-1]//2

print(answer)

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

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

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

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())
ans = 0
high = 0
for i in range(n):
    p = int(input())
    ans += p
    high = max(high, p)

print(int(ans - high / 2))

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

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

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 = [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)//2)

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


if __name__ == "__main__":
    main()

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

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

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

P.sort()

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

Solution (Python):

n=int(input())
p_max=0
ans=0
for i in range(n):
    x=int(input())
    ans+=x
    p_max=max(p_max,x)
ans-=p_max/2
print(int(ans))

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

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

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

Solution (Python):
n = int(input())
m = 0
c = 0
for _ in range(n):
    p = int(input())
    c += p
    if m < p:
        m = p
print(c - m // 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)]
P.sort()
print(P[-1]//2 + sum(P[:N-1]))

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

P.sort()
P[-1] = int(P[-1]/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 = [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)]
print(sum(p)-max(p)//2)

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

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

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

print(sum)

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

m = max(p)//2

sum = 0

for i in p:
  sum += i
ans = sum - m

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

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

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

Solution (Python):
import sys
import os


def main():
    if os.getenv("LOCAL"):
        sys.stdin = open("input.txt", "r")

    N = int(sys.stdin.readline().rstrip())
    P = [ int(sys.stdin.readline().rstrip()) for i in range(N)]

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



if __name__ == '__main__':
    main()

Solution (Python):
def main(n, p):
    p.sort()

    t = p.pop() // 2

    print(sum(p) + t)


if __name__ == "__main__":
    n = int(input())
    p = [int(input()) for _ in range(n)]

    main(n, p)

Solution (Python):


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

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

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

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

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

Solution (Python):
import math
import itertools
import statistics

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

total = sum(p)
print(int(total-max(p)+max(p)/2))

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

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

Solution (Python):
n=int(input())
p=[int(input()) for _ in range(n)]
ma=max(p)
print(int(sum(p)-ma/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):
p=sorted([int(input()) for _ in range(int(input()))])
print(sum(p[:-1])+p[-1]//2)

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

Solution (Python):
X = [int(input()) for _ in range(int(input()))]
maxX = max(X)
X.remove(maxX)
print(sum(X) + round(maxX / 2))

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
p[p.index(max(p))] = max(p)/2
print(round(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()))
h=max(p)
print(sum(p)-h+h//2)

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

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

ans = s - (max(p)/2)
ans = format(ans,'.0f')
print(ans)

Solution (Python):
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    n=INT()
    p=[]
    for i in range(n):
        p.append(INT())
    print(int(sum(p)-max(p)/2))
    
if __name__ == '__main__':
    do()

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

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

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

Solution (Python):
import math
import string


def readints():
    return list(map(int, input().split()))


def nCr(n, r):
    return math.factorial(n)//math.factorial(n-r)*math.factorial(r)


n = int(input())
b = 0
x = 0
for i in range(n):
    a = int(input())
    b += a
    x = max(x, a)
print(b-(x//2))

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

Solution (Python):
N = int(input())
P = sorted([int(input()) for p in range(N)])
print(sum(P[:N - 1]) + int(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())
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()))


p.sort(reverse=True)

max = p[0]
els = p[1:]


print(sum(els) + int((max/2)))

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

Solution (Python):
import sys
input = sys.stdin.readline
N = int(input())
P = [int(input()) for _ in range(N)]

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

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

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

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

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

Solution (Python):
n = int(input())
a = []
for i in range(n):
    a.append(int(input()))
a.sort(reverse=True)
p = a[0]
a.pop(0)

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

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

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

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

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

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

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

Solution (Python):



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

p_list.sort()

sum = p_list[-1] / 2
for i in p_list[:-1]:
    sum += i

print(int(sum))

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())
Price = [int(input()) for i in range(N)]
Price.sort()

total = sum(Price[:-1]) + Price[-1] // 2
print(total)

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, *P = sorted((int(input()) for _ in range(N)), reverse=True)
print(p // 2 + sum(P))

Solution (Python):

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

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

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

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

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

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

p.sort()

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

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

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

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

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

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

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

P.sort()
print(sum(P)-P[-1]//2)