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.



Sample input:
3
4980
7980
6980


Sample output:
15950

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
a = [int(input())for i in range(N)]
m = a.index(max(a))
a[m] /= 2
print(round(sum(a)))

Submission status: Accepted

Solution code:
n1 = int(input())

m1 = 0
s1 = 0
t1 = 0

for i1 in range(n1):
    t1 = int(input())
    s1 += t1
    if m1 < t1:
        m1 = t1

s1 -= (m1 // 2)
print(s1)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nN = int(input())
nP = [ 0 for i in range(nN)]
 
for i in range(nN):
  nP[i] = int(input())

nP.sort(reverse=True)
 
nAns = 0
for i in range(nN):
  if i == 0:
    nAns += (nP[i]//2)
  else:
    nAns += nP[i]

print('%d' %(nAns))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p_list = [int(input()) for i in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
presents = [int(input()) for _ in range(N)]
presents.sort()
price = 0
for i in range(N):
    if i == len(presents)-1:
        price += presents[i]//2
    else:
        price += presents[i]
print(price)

Submission status: Accepted

Solution code:
N = int(input())
P = []
maximum_val = 0
maximum_index = 0

for i in range(N):
	a = int(input())
	P.append(a)
	if a > maximum_val:
		maximum_val = a
		maximum_index = i
print(int(sum(P) - P[maximum_index] / 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

def main():
	n = int(input().strip())
	s = [0] * n
	for i in range(n):
		s[i] = int(input().strip())
	print(sum(s) - max(s) // 2)

if __name__ == '__main__':
	main()

Submission status: Accepted

Solution code:
n = int(input().strip())
ans = 0
mp = 0
for i in range(n):
  p = int(input().strip())
  ans += p
  mp = max(mp, p)
ans -= (mp / 2)

print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n,*a=map(int,open(0));print(sum(a)-max(a)//2)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# ABC 115, B - christmas eve eve
n = int(input())
P = [int(input()) for i in range(n)]

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

Submission status: Accepted

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

Submission status: Accepted

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

List.sort()
num = 0
for j in range(N):
    if j == N-1:
        num += List[j]*0.5
    else:
        num += List[j]

print(int(num))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

p.sort()

p[n-1] /= 2

print(int(sum(p)))

Submission status: Accepted

Solution code:
# ABC 115 B

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


if __name__ == "__main__":
    resolve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
p = [0]*N
s = 0

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

Submission status: Accepted

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

for i in range(N):
    p.append(int(input()))
    
mxi = p.index(max(p))
p[mxi] = p[mxi]//2
s = 0
for i in range(N):
    s = s+p[i]

print(s)

Submission status: Accepted

Solution code:
N = int(input())

pMax = 0
sumP = 0
for _ in range(N) :
    p = int(input())
    pMax = max(pMax, p)
    sumP += p

print(sumP - pMax // 2)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
lst = []

for i in range(n):
  item = int(input())
  lst.append(item)

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

print(sum(goods))

Submission status: Accepted

Solution code:
import sys

sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def solve(inputs):
    items = list(map(lambda x: int(x), inputs))
    items.sort()
    price = items.pop() // 2
    for i in items:
        price += i
    return price


def string_to_int(string):
    return list(map(lambda x: int(x), string.split()))


if __name__ == "__main__":
    N = int(input())
    ret = solve(inputs(N))
    print(ret)

Submission status: Accepted

Solution code:
N = int(input())
P = [0] * N
for i in range(N):
    P[i] = int(input())
ans = sum(P) - max(P)//2
ans = round(ans)

print(ans)

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
b = []
for i in range(a):
    b.append(int(input()))
b = sorted(b, reverse=True)
print(sum(b) + b[0] // 2 - b[0])

Submission status: Accepted

Solution code:
N = int(input())
items = []
for _ in range(N):
    item = int(input())
    items.append(item)

items.sort()

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

Submission status: Accepted

Solution code:

def main():

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


if __name__== "__main__":
    main()

Submission status: Accepted

Solution code:
N=int(input()) 
a=[int(input()) for i in range(N)]
b=0

for n in range(N):
    if n==a.index(max(a)):
        b+=a[n]/2
    else:
        b+=a[n]
print(int(b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
tmp = 0
for _ in range(N):
    p = int(input())
    ans += p
    tmp = max(tmp, p)

print (ans - tmp//2)

Submission status: Accepted

Solution code:
n=int(input())
x=list(int(input()) for _ in range(n))
res=int(sum(x)-max(x)/2)

print(res)

Submission status: Accepted

Solution code:
N = int(input())
P = []
for i in range(0, N):
    P.insert(i, int(input()))
P = sorted(P)
print(sum(P) - int(P[len(P) - 1] / 2))

Submission status: Accepted

Solution code:
n = int(input())
p = [int(input()) for _ in range(n)]
pmx = max(p)
p[p.index(pmx)] = pmx // 2
print(sum(p))

Submission status: Accepted

Solution code:
#Coding: utf-8

N=int(input())
a=[]
total=0
for i in range(N):
    a.append(int(input()))

a.sort(reverse=True)
for l in range(N):
    if l==0:
        a[l]=a[l]/2
    total=total+a[l]

print(int(total))

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
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')

#A
def A():
    d = II()
    print("Christmas",end="")
    for _ in range(25 - d):
        print(" Eve", end="")
    print()
    return

#B
def B():
    n = II()
    p = IR(n)
    p.sort()
    print(sum(p) - p[-1] // 2)
    return

#C
def C():
    return

#D
def D():
    return

#Solve
if __name__ == '__main__':
    B()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n=int(input())
info=[]
max=0
for i in range(n):
    num=int(input())
    info.append(num)
    if max<=num:
        max=num

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

max_price = max(P)
max_index = P.index(max_price)
del P[max_index]
print(sum(P) + int(max_price / 2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

# input
N = int(input())
p = list()
for _ in range(N):
    p.append(int(input()))

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

# output
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = int(input())
b = [int(input()) for _ in range(a)]
b = sorted(b, reverse=True)
c = 0
for i in range(a):
    if i == 0:
        c += b[i] // 2
    else:
        c += b[i]
print(c)

Submission status: Accepted

Solution code:
import math

n = int(input())
ans = 0
dmax = -1000
for i in range(0,n):
    a = int(input())
    ans+=a
    dmax = max(dmax,a)

print (ans - dmax + int(dmax/2))

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    N = int(input())
    p_list = [int(input()) for _ in range(N)]

    p_list = sorted(p_list, reverse=True)

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

Submission status: Accepted

Solution code:
N = int(input())
Ps = [list(map(int, input().split())) for _ in range(N)]
max_p = max(Ps)
Ps.remove(max_p)
Ps.append([max_p[0]//2])
r = 0
for p in Ps:
  r += p[0]
print(r)

Submission status: Accepted

Solution code:
import sys
import numpy as np

N = int(input())

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

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

Submission status: Accepted

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

p_list.sort()
max = p_list.pop()
p_list.append(max/2)
print(int(sum(p_list)))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
a = int(input())
b = list(int(input()) for i in range(a))
c = sorted(b,reverse=True)
c[0] = int(c[0]/2)
print(sum(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())
p = sorted([int(input()) for i in range(n)], reverse=True)
p[0] //= 2

print(sum(p))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
#ABC115 B

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
'''
allinputs = iter(input().splitlines())
input = lambda : next(allinputs)
#'''
N = int(input())
p = [int(input()) for _ in range(N)]
p.sort()
p[-1] //= 2
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = []
m = 0
for i in range(n):
    price = int(input())
    p.append(price)
    m = max(m, price)
print(sum(p) - int(m / 2))

Submission status: Accepted

Solution code:
N=int(input())
plist=[]
for i in range(N):
  p=int(input())
  plist.append(p)
  
plist.sort()
print(plist.pop()//2+sum(plist))

Submission status: Accepted

Solution code:
a = int(input())
b = [int(input()) for _ in range(a)]
b = sorted(b, reverse=True)
c  = 0
for i in range(a):
    if i == 0:
        c += b[i] // 2
    else:
        c += b[i]
print(c)

Submission status: Accepted

Solution code:
N = input()
N = int(N)
list = []
ans = 0
for i in range(N):
    token = input()
    list.append(int(token))
maxvalue_index = list.index(max(list))
for i in range(N):
    ans += list[i]
ans -= list[maxvalue_index] / 2
print(int(ans))

Submission status: Accepted

Solution code:
#n, m = map(int,input().split())
n = int(input())
#ls = list(map(int,input().split()))
#ls = [list(map(int,input().split()))[1:] for i in range(n)]
ls = [int(input()) for i in range(n)]
#s = input()
maxi = max(ls)
ls.remove(maxi)
print(sum(ls) + int(maxi/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
S=int(input())

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

p.sort(reverse=True)

money=0

for i in range(S):
    money+=p[i]

print(int(money-p[0]/2))

Submission status: Accepted

Solution code:
n = int(input())
l = [int(input()) for i in range(n)]
m = max(l)
l.remove(m)

print(m // 2 + sum(l))

Submission status: Accepted

Solution code:
from sys import stdin
N = int(input())
P = sorted([int(p) for p in stdin.read().splitlines()])
 
print(int(P[-1]/2)+sum(P[:-1]))

Submission status: Accepted

Solution code:
N = int(input())
price = []
p = 0
for i in range(N):
  price.append(int(input()))
m = price.index(max(price))
for j in range(len(price)):
  if j != m:
     p += price[j]
  else:
     p += price[j]//2
print(p)

Submission status: Accepted

Solution code:
#とある世界では、今日はクリスマスイブの前日です。
#高羽氏は、デパートで N 個の品物を買おうとしています。
#i 個目の品物 (1≤i≤N) の定価は pi 円です。
#彼は割引券を持っており、N 個のうち最も定価が高い品物 1 個を定価の半額で買うことができます。
#残りの N−1 個の品物に対しては定価を支払います。
#支払金額は合計でいくらになるでしょうか？
N = int(input())
p = []
for i in range(N):
    P = int(input())
    p.append(P)
    q = sorted(p, reverse=True)

    sum = 0
for i in range(1, N):
    sum+=q[i]


print(int(q[0]/2+sum))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = list(int(input()) for i in range(n))
p.sort()
max = p.pop(-1)
p.append(max / 2)
print(round(sum(p)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = list(int(input()) for i in range(n))
a = p.pop(p.index(max(p))) / 2
print(int(sum(p) + a))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

N = n()
P = []
for i in range(N):
    P.append(n())
P = sorted(P, reverse=True)

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

Submission status: Accepted

Solution code:
N = int(input())
List = [int(input()) for _ in range(N)]

M = max(List)
List.remove(M)
print(sum(List)+M//2)

Submission status: Accepted

Solution code:
# ABC115B - Christmas Eve Eve
def main():
    n = int(input())
    lst = sorted(list(map(int, [input().rstrip() for _ in range(n)])))
    print(sum(lst) - lst[-1] // 2)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
N = int(input())
p_List = list(int(input()) for i in range(N))
Max = max(p_List)

Sum = sum(p_List) - Max / 2

print(int(Sum))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
 
sum = 0
max = 0
for _ in range(N):
  p = int(input())
  if(p > max):
    max = p
  sum += p
val = sum - max/2
print(int(val))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

highest =kaimono.index(max(kaimono))  
kaimono[highest] = max(kaimono)//2
#print(highest)
print(sum(kaimono))

Submission status: Accepted

Solution code:
def abc():
    n = int(input().rstrip())
    l = []
    for i in range(n):
        l.append(int(input().rstrip()))
    l.sort(reverse=True)
    print(l[0] // 2 + sum(x for x in l[1:]))


abc()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
pn = []
for _ in range(n):
  pn.append(int(input()))
pmax = max(pn)
psum = sum(pn)
print(psum - pmax//2)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
sum = 0
high = 0
for i in range(n):
	x = int(input())
	sum += x
	if high<x:
		high = x
sum -= high//2
print(sum)

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline

N = int(input())

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

p.sort()
last = p.pop() / 2
print(int(sum(p) + last))

Submission status: Accepted

Solution code:
n = int(input())
items = []

for _ in range(n):
  items.append(int(input()))
  
print(sum(items) - max(items) + max(items) // 2)

Submission status: Accepted

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

Submission status: Accepted

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

p_max = max(p)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
p = [int(input()) for i in range(N)]
print(sum(p)-max(p)//2)

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N = int(input())
p = [int(input()) for i in range(N)]
maxim = max(p)
p.remove(max(p))
print(sum(p)+maxim//2)

Submission status: Accepted

Solution code:
N = int(input())

ans = 0
m = 0

for _ in range(N):
    p = int(input())
    ans += p
    m = max(m, p)

print(ans-(m//2))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

maxp = max(p)
total = sum(p)

price = total - maxp + maxp//2
print(price)

Submission status: Accepted

Solution code:
N = int(input())

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

pay = P.pop(0)//2+sum(P)


print(pay)

Submission status: Accepted

Solution code:
import sys
n=int(input())
a=list(map(int,sys.stdin))
a.sort()
print(sum(a[:n-1])+a[n-1]//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    N = int(input())
    prices = []
    ans = 0
    for i in range(N):
        prices.append(int(input()))
    prices = sorted(prices)
    for j in range(N):
        if j == N-1:
            ans += prices[j]//2
        else:
            ans += prices[j]
    print(ans)
main()

Submission status: Accepted

Solution code:


N = int(input())

P = []
max = 0
number = 0

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

    if max < p:
        max = p
        number = i

    P.append(p)

P[number] = max/2

print(int(sum(P)))

Submission status: Accepted

Solution code:
import numpy as np

# 初期値を入力

N = int(input())

P = []
max = 0
number = 0

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

    if max < p:
        max = p
        number = i

    P.append(p)

# メインプログラム

P[number] = max/2

print(int(sum(P)))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

p_sum = sum(p)
p_max = max(p)
print(int(p_sum - (p_max / 2)))

Submission status: Accepted

Solution code:
N = int(input())
p_list = []
for _ in range(N):
    p_list.append(int(input()))
    
max_p = max(p_list)
print(sum(p_list)-max_p + max_p//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def resolve():
    N=int(input())
    l=[]
    for i in range(N):
        l.append(int(input()))
    print(sum(l)-max(l)//2)

resolve()

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
B - Christmas Eve Eve
https://atcoder.jp/contests/abc115/tasks/abc115_b

"""
import sys


def solve(prices):
    return sum(prices[:-1]) + prices[-1]//2


def main(args):
    N = int(input())
    prices = sorted([int(input()) for _ in range(N)])
    ans = solve(prices)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

Solution code:
print(eval("sum({0})-max({0})//2".format([int(input()) for i in range(int(input()))])))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
max_item = 0
sum_item = 0
i = 0

while N > i:                  
    c = int(input())                
    sum_item += c                   
    max_item = max(c, max_item)     
    i += 1

sum_item -= max_item // 2           
print(sum_item)

Submission status: Accepted

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