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

sys.setrecursionlimit(10000000)
import os
import math
import bisect
import collections
import itertools
import heapq
import re
import queue



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

lcm = lambda x, y: (x * y) // math.gcd(x, y)


MOD = 10 ** 9 + 7
MAX = float('inf')


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

    N = ii()
    P = [ii() for _ in range(N)]
    mx = max(P)
    P.remove(mx)
    P.append(mx // 2)
    print(sum(P))


if __name__ == '__main__':
    main()

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

Solution (Python):

import sys
input = sys.stdin.readline









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

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

Solution (Python):

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

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

Solution (Python):
n = int(input())
a = 0
ans = 0
for i in range(n):
    k = int(input())
    a = max(a, k)
    ans += k

ans -= a // 2

print(ans)

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

for i in range(0,N):
  p = int(input())
  arrp.append(p)
print(int(-0.5*max(arrp)+sum(arrp)))

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

Solution (Python):





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

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

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

for i in range(0,N):
  p = int(input())
  arrp.append(p)
print(int(-0.5*max(arrp)+sum(arrp)))

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

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

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


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





if __name__ == "__main__":
    main()

Solution (Python):




N = int(input())

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

list=sorted(list)
list.reverse()


ans = 0

for i, l in enumerate(list):
    if i==0:
        ans = l/2
    else:
        ans = ans + l

print(int(ans))

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

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

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

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

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

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

Solution (Python):






import sys
input = sys.stdin.readline

import math
import bisect
from collections import deque
from fractions import gcd
from functools import lru_cache






MOD = 10**9+7
INF = float('inf')






def inputI(): return int(input().strip())
def inputS(): return input().strip()
def inputIL(): return list(map(int,input().split()))
def inputSL(): return list(map(str,input().split()))
def inputILs(n): return list(int(input()) for _ in range(n))
def inputSLs(n): return list(input().strip() for _ in range(n))
def inputILL(n): return [list(map(int, input().split())) for _ in range(n)]
def inputSLL(n): return [list(map(str, input().split())) for _ in range(n)]


def Yes(): print("Yes"); return
def No(): print("No"); return


def inv(n): return pow(n, MOD-2, MOD)


kaijo_memo = []
def kaijo(n):
  if(len(kaijo_memo) > n):
    return kaijo_memo[n]
  if(len(kaijo_memo) == 0):
    kaijo_memo.append(1)
  while(len(kaijo_memo) <= n):
    kaijo_memo.append(kaijo_memo[-1] * len(kaijo_memo) % MOD)
  return kaijo_memo[n]

gyaku_kaijo_memo = []
def gyaku_kaijo(n):
  if(len(gyaku_kaijo_memo) > n):
    return gyaku_kaijo_memo[n]
  if(len(gyaku_kaijo_memo) == 0):
    gyaku_kaijo_memo.append(1)
  while(len(gyaku_kaijo_memo) <= n):
    gyaku_kaijo_memo.append(gyaku_kaijo_memo[-1] * pow(len(gyaku_kaijo_memo),MOD-2,MOD) % MOD)
  return gyaku_kaijo_memo[n]

def nCr(n,r):
  if(n == r):
    return 1
  if(n < r or r < 0):
    return 0
  ret = 1
  ret = ret * kaijo(n) % MOD
  ret = ret * gyaku_kaijo(r) % MOD
  ret = ret * gyaku_kaijo(n-r) % MOD
  return ret


def factorization(n):
    arr = []
    temp = n
    for i in range(2, int(-(-n**0.5//1))+1):
        if temp%i==0:
            cnt=0
            while temp%i==0:
                cnt+=1
                temp //= i
            arr.append([i, cnt])
    if temp!=1:
        arr.append([temp, 1])

    if arr==[]:
        arr.append([n, 1])
    return arr


def lcm(a, b):
    return a * b // gcd (a, b)


def count_bit(n):
  count = 0
  while n:
    n &= n -1
    count += 1
  return count





N = inputI()
l = inputILs(N)

l.sort()

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

Solution (Python):
import itertools
import math
import fractions
import functools
import copy

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):
    P.append(int(input()))
    
P.sort(reverse=True)

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

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

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

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

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

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

Solution (Python):
n = int(input())
p = [int(input()) for _ in range(n)]
max_p = max(p)*0.5
print(int(max_p+(sum(p)-max(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 i in range(N)])[::-1]

Sum=p[0]/2

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

print(int(Sum))

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

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

Solution (Python):
import sys
import math
import bisect

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

if __name__ == "__main__":
    main()

Solution (Python):
N = int(input())
P = [int(input()) for i in range(N)]
L = max(P)
G = L // 2
V = 0
for i in range(N):
        V += P[i]
F = V - L
print(G + F)

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

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

Solution (Python):
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right, insort_left, insort_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
from fractions import gcd
import sys
def input(): return sys.stdin.readline().rstrip()
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = 10**18


n = I()
P = IR(n)
print(sum(P)-(max(P)//2))

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

maxkun = max(p)//2
p.remove(max(p))
print(maxkun + sum(p))

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

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

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

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

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

p.sort()

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

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

Solution (Python):


import sys






















def main():
    mod = 1000000007                
    inf = float('inf')              
    
    sys.setrecursionlimit(10**6)    
    def input(): return sys.stdin.readline().rstrip()
    def ii():    return int(input())
    def mi():    return map(int, input().split())
    def mi_0():  return map(lambda x: int(x)-1, input().split())
    def lmi():   return list(map(int, input().split()))
    def lmi_0(): return list(map(lambda x: int(x)-1, input().split()))
    def li():    return list(input())
    
    
    n = ii()
    p = [ii() for _ in range(n)]
    print(sum(p) - max(p)//2)


if __name__ == "__main__":
    main()

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

max = 0
sum = 0
for n in range(N):
  x = int(input())
  if max < x:
    max = x
  sum += x
print(sum-max//2)

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

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

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

s = int(sum(l[0:-1]) + l[-1]/2)
print(s)

Solution (Python):
N = int(input())
List = [int(input()) for _ in range(N)]
last = sorted(List)[-1] * 0.5
print(int(sum(List) - last))

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

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

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

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

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

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

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

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

Solution (Python):
import itertools
import math
import fractions
import functools
n = int(input())
p = []
for i in range(n):
    p.append(int(input()))

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

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

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

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

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

Solution (Python):
import sys

input = sys.stdin.readline


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

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


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

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

print(int(max(P) * 0.5 + sum(P) - max(P)))

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

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

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

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

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

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

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

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

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

Solution (Python):

import sys
try:
    from typing import List
except ImportError:
    pass


def solve(N: int, p: "List[int]"):
    print(sum(p) - max(p) // 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)]  
    solve(N, p)


if __name__ == '__main__':
    main()

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

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

Solution (Python):
n = int(input())
p_list = sorted([int(input()) for _ in range(n)])
print(sum(p_list) - p_list[-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())
pl = tuple(int(input())for _ in range(N))
p_mx = max(pl)//2
ans = sum(pl) - p_mx
print(ans)

Solution (Python):
n=int(input())
ma=0
s=0
for i in range(n):
    k=int(input())
    if k>ma:
        ma=k
    s+=k
print(ma//2+s-ma)

Solution (Python):
n = int(input())
p_list = [int(input()) for nesya in range(n)]
a = max(p_list)//2
c = 0
for hoge in p_list:
  c += hoge
print(c-a)

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

Solution (Python):


N = int(input())




def main():
    p = []
    my_max = 0
    ans = 0
    for i in range(N):
        p = int(input())
        ans += p
        my_max = max(my_max, p)
    print(ans - my_max // 2)


if __name__ == "__main__":
    main()

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

prices_sum = sum(prices)
ans = prices_sum - (max(prices) / 2)

print(int(ans))

Solution (Python):
import sys
sys.setrecursionlimit(10**8)
def ii(): return int(sys.stdin.readline())
def mi(): return map(int, sys.stdin.readline().split())
def li(): return list(map(int, sys.stdin.readline().split()))
def li2(N): return [list(map(int, sys.stdin.readline().split())) for i in range(N)]
def dp2(ini, i, j): return [[ini]*i for i2 in range(j)]
def dp3(ini, i, j, k): return [[[ini]*i for i2 in range(j)] for i3 in range(k)]





N = ii()
A = sorted([ii() for _ in range(N)])

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

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

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

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

Solution (Python):


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

Solution (Python):
N = int(input())
P = [int(input()) for _ in range(N)]
mp = max(P)
mpi = P.index(mp)
print(sum(P[:mpi]+P[mpi+1:])+mp//2)

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 _ in range(n)]
p.sort()
p.reverse()
p[0] //= 2
print(sum(p))

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

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

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

Solution (Python):
import sys
input = sys.stdin.readline
sys.setrecursionlimit(10**7)
from collections import Counter, deque
from collections import defaultdict
from itertools import combinations, permutations, accumulate, groupby, product
from bisect import bisect_left,bisect_right
from heapq import heapify, heappop, heappush
from math import floor, ceil
from operator import itemgetter
from copy import deepcopy
def I(): return int(input())
def MI(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def LI2(): return [int(input()) for i in range(n)]
def MXI(): return [[LI()]for i in range(n)]
inf = 10**17
mod = 10**9 + 7


n=I()
l=[I() for i in range(n)]
l.sort()
print(sum(l)-l[-1]//2)

Solution (Python):

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

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

Solution (Python):
def main():
    n = int(input())
    num_list = [int(input()) for _ in range(n)]

    num_list.sort(reverse=True)

    count = 0

    for i in range(n):
        if i == 0:
            count += num_list[i] // 2
        else:
            count += num_list[i]

    print(count)

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):

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

p.sort()
a = int(p.pop(-1) / 2)
print(a+sum(p))

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

idx = p.index(max(p))

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

print(int(ans))

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

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

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

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

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

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

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

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

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

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

highest = None

for i in p:
    if highest is None:
        highest = i
        continue
    if highest < i:
        highest = i

for i in range(len(p)):
    if p[i] == highest:
        p[i] = highest / 2
        break
        
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 = [0] * N
for i in range(N):
    p[i] = int(input())

mx = max(p)
p.pop(p.index(mx))

print(sum(p) + mx // 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):
import sys
import numpy as np






input = sys.stdin.readline
N = int(input())
p = [int(input()) for i in range(N)]
p.sort(reverse=True)
p[0] = int(p[0]/2)
print(sum(p))

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

Solution (Python):
N = int(input())
li = []
for i in range(N):
    li.append(int(input()))
maxnum = max(li)
del li[li.index(maxnum)]
price = 0
for i in li:
    price += i
price += maxnum // 2
print(price)

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

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 = list()
for a in range(0, N):
    p.append(int(input()))

mx = p.pop(p.index(max(p)))
mx //= 2

print(sum(p) + mx)

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

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

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

Solution (Python):
import sys
import os
import math
import string

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

lcm = lambda x, y: x * y / math.gcd(x, y)

MOD = 10 ** 9 + 7
MAX = float('inf')


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

    N = ii()
    P = iln(N)
    print(max(P) // 2 + sum(P) - max(P))


if __name__ == '__main__':
    main()

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

Solution (Python):

import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))

N = ir()
P = [ir() for _ in range(N)]
answer = sum(P) - max(P) // 2
print(answer)

Solution (Python):
N = int(input())
p = [int(input()) for _ 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()
l[-1]=l[-1]//2
print(sum(l))

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

Solution (Python):


def solve():

    N = int(input())

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

    
    m = max(Plist)
    Plist.remove(Plist[Plist.index(m)])
    print(m//2+sum(Plist))


if __name__ == "__main__":
    solve()

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

Solution (Python):
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

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

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

Solution (Python):
def main():
    import sys
    input = sys.stdin.readline
    sys.setrecursionlimit(10**7)
    from collections import Counter, deque
    
    from itertools import combinations, permutations, accumulate, groupby, product
    from bisect import bisect_left,bisect_right
    from heapq import heapify, heappop, heappush
    from math import floor, ceil
    

    
    

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

if __name__ == '__main__':
    main()

Solution (Python):

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

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

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

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

Solution (Python):
def bChristmas(n, pl):

    return int(sum(pl) - (max(pl)/ 2))

def main():
    n = int(input())
    pl = [int(input()) for i in range(n)]
    print(bChristmas(n, pl))

if __name__ == '__main__':
    main()

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

p.sort()

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

print(sum(p))

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

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

max = p[0]
max_i = 0
for i in range(N):
    if max < p[i]:
        max = p[i]
        max_i = i

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

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):
p=[int(input()) for _ in range(int(input()))]
ans=0
for i in range(len(p)):
    ans+=p[i]
ans=ans-max(p)+max(p)/2
print(int(ans))

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

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

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

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

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

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

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

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

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

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

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

Solution (Python):
import numpy as np
import sys

n = int(input())
mx = 0
sm = 0
for i in range(n):
	p = int(input())
	sm += p
	if(p > mx):
		mx = p
sm -= mx
sm += mx // 2
print(sm)

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

Solution (Python):
def main():
    N = int(input())
    price = [int(input()) for _ in range(N)]
    price.sort()
    print(sum(price[:len(price)-1]) + price[-1]//2)
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 _ in range(N)]
print(sum(P) - max(P) + max(P)//2)