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:
#115 B
N=int(input())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(sum(list1))

Submission status: Accepted

Solution code:
N = int(input())

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

buy.sort(reverse=True)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

b.sort()

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

print(int(sum(b)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

plist.sort()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

n = int(input())

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

p.sort(reverse=True)

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

Submission status: Accepted

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

p.sort(reverse=True)

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

Submission status: Accepted

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

Submission status: Accepted

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

n = int(input())

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

p.sort(reverse=True)

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(total)

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:

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(int(half + sum))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
INF = float("inf")


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


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    p = [int(next(tokens)) for _ in range(N)]  # type: "List[int]"
    solve(N, p)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys

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

Submission status: Accepted

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

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

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

print(S)

Submission status: Accepted

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

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

p[0] = p[0]//2
#print(p[0])
for i in range(n):
	sum += p[i]

print(sum)

Submission status: Accepted

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

M = int(max(P))

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

print(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

SUM = sum(a) - MAX_PRICE/2

print(int(SUM))

Submission status: Accepted

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

Submission status: Accepted

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

print sum

Submission status: Accepted

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

print(int(sum(p)))

Submission status: Accepted

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

Submission status: Accepted

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

p.sort(reverse=True)
total = 0

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

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

print(total)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

print(int(sum(a)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(raw_input())
p = []
for i in range(n):
	p.append(int(raw_input()))
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[:n-1]) + a[n-1] // 2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(price)

Submission status: Accepted

Solution code:
N=int(input())
p=[]
for i in range(N):
        val=int(input())
        p.append(val)
print(max(p)//2+sum(p)-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) * 0.5))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
list = sorted([int(input()) for i in range(N)])
#合計金額
num = 0
for i in range(N):
  if i == N-1:
    num += int(0.5 * list[i])
  else:
    num += list[i]
    
print(num)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    p = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, p)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

S -= M//2
print(S)

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
###B - Christmas Eve Eve
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())
p=[]
for i in range(n):
  p+=[int(input())]
print(sum(p)-max(p)//2)

Submission status: Accepted

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

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
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS():return list(map(list, sys.stdin.readline().split()))
def S(): return list(sys.stdin.readline())[:-1]
def IR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = I()
    return l
def LIR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = LI()
    return l
def SR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = S()
    return l
def LSR(n):
    l = [None for i in range(n)]
    for i in range(n):l[i] = SR()
    return l
mod = 1000000007

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

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

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

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

#F
def F():
    return

#G
def G():
    return

#H
def H():
    return

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
x = 0
y = 0
for i in range(n):
    p = int(input())
    if p > x:
        x = p
    y += p
print(y - x // 2)

Submission status: Accepted

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

Submission status: Accepted

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

pi = sorted(pi)

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

print(int(sum(pi)))

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys


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

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

    print(ans)
    
    return


# Generated by 1.1.3 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    N = int(next(tokens))  # type: int
    p = [ int(next(tokens)) for _ in range(N) ]  # type: "List[int]"
    solve(N, p)

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

# print(p)

p = sorted(p)

maxp = p.pop(-1)

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

max_p = p[0]/2

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

print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

price_list = []

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(sum(p))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

P.sort(reverse=True)

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import exit
# A,B,C = [int(n) for n in input().split()]
N = int(input())
P = [int(input()) for _ in range(N)]
P = sorted(P)
P[-1] = P[-1]//2
print(sum(P))
# S = str(input())
# L = len(S)
# T = str(input())
# exit()

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

max = p.index(max(p))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
#!/usr/bin/env python3
N = int(input())
m = [int(input()) for i in range(N)]
print(int(sum(m) - max(m)/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
S=0 
A=0
for i in range(N) :
  B=int(input())
  S = S + B
  if A<B :
    A=B
print(int(S-A/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())  # 数値入力

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

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

print(ans)

Submission status: Accepted

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

p = sorted(p)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
n=int(input())
pl=[]
for i in range(0,n):
  pl.append(int(input()))
pl.sort(reverse=True)
pl[0]=pl[0]/2
print(int(sum(pl)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

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

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

print(int(np.sum(price) - price[max_index] / 2))

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
P = sorted([int(input()) for _ in range(N)])
print(sum(P) - P[-1] // 2)

Submission status: Accepted

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

Submission status: Accepted

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

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

p = sorted(p)

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

Submission status: Accepted

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

Submission status: Accepted

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

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