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

Submission status: Accepted

Solution code:
def main():
  N = int(input())
  items = [int(input()) for _ in range(N)] 
  items.sort() # 最も定価が高いものを半額で変える
  items[-1] = items[-1] // 2

  result = 0
  for n in items:
    result += n
  print(result)

main()

Submission status: Accepted

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

a[a.index(max(a))] /= 2

print(int(sum(a)))

Submission status: Accepted

Solution code:
n=int(input())
l=[int(input()) for i in range(n)]
l.sort(reverse=True)
#print(l)
ans=0
for i in range(n):
    if i==0:
        ans+=l[i]//2
    else:
        ans+=l[i]
print(ans)

Submission status: Accepted

Solution code:
N, *P = map(int, open(0).read().split())
print(sum(P) - max(P) // 2)

Submission status: Accepted

Solution code:
N, *P = map(int, open(0).read().split())
print(sum(P) - max(P) + max(P) // 2)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from statistics import mean, median,variance,stdev
import sys
import math

#a = input().split()
#y = input().split()


#y = int(input())
x = int(input())
a = []
for i in range(x):
    a.append(int(input()))
a = sorted(a,reverse=1)
a[0]/=2
print(int(sum(a)))

Submission status: Accepted

Solution code:
N = int(input())

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

p.sort()
p.reverse()

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

print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(raw_input())
max=0
sum=0
for i in range(a):
	b= int(raw_input())
	sum+=b
	max = max if max > b else b
	
print sum-(max/2)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
import numpy as np


n = int(input())
ps = []
for i in range(n):
    ps.append(int(input()))
ps = np.array(ps)
ps[np.argmax(ps)] = ps[np.argmax(ps)] / 2
print(int(np.sum(ps)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
num = 1
list = []

while num <= n:
    list.append(int(input()))
    num += 1

m = max(list)
num2 = 0
aa = True
for i in list:
    if i == m and aa:
        list[num2] = int(m / 2)
        num2 += 1
        aa = False
    else:
       i
       num2 += 1

print(sum(list))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
items=sorted(
  int(input())
  for i in range(int(input()))
)
print(int(sum(items,items.pop()/2)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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())
list = []
max = 0
ans = 0

for i in range(n):
    line = int(input())
    list.append(line)
    if list[i] > max:
        max = list[i]
        c = i

for i in range(n):
    if c == i:
        ans = ans + (list[i] / 2)
    else:
        ans = ans + list[i]

print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=input()
intN=int(N)
max=0
total=0
for i in range(intN):
    add=(int(input()))
    total+=add
    if max<add:
        max=add
print(int(total-max/2))

Submission status: Accepted

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

total = int(max(a)/2)
a.remove(max(a))
total += sum(a)

print(total)

Submission status: Accepted

Solution code:
n = int(input())
i = 0
li = []
while(n > i):
    price = int(input())
    li.append(price)
    i += 1
li.sort(reverse = True)
result = li[0] // 2
for j in range(1, len(li)):
    result += li[j]
print(result)

Submission status: Accepted

Solution code:
N = int(input())
p_list = [int(input()) for i in range(N)] 
sum = 0
for i in range(N):
  if i == p_list.index(max(p_list)):
   sum += int(p_list[i]/2)
  else:
    sum += p_list[i]
print(sum)

Submission status: Accepted

Solution code:
N, = [int(i) for i in input().split(' ')]

import sys
hs = []
maxh = None
tt = 0
for line in sys.stdin:
    h, = line.strip().split(" ")
    h = int(h)
    tt += h
    if maxh == None:
        maxh = h
    elif h > maxh:
        maxh = h
print(tt - (maxh//2))

Submission status: Accepted

Solution code:
N = list(map(int,input().split()))
p = []
for i in range(N[0]):
  p.append(int(input()))
max = 0
sum = 0
for i in range(N[0]):
    sum += p[i]
    a = p[i]
    if max < a :
        max = a
print(int(sum-(int(max/2))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = sorted(list(map(int,[input() for _ in range(n)])))
print(round(sum(p)-max(p)+max(p)/2))

Submission status: Accepted

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

Submission status: Accepted

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

for i in range(N):
  gifts.append(int(input()))
  
price = sum(gifts) - max(gifts) // 2
print(price)

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:
n = int(input())
prices = []
max_idx = 0
max_price  =0
for i in range(n):
    price = int(input())
    prices.append(int(price))
    if max_price <= price:
        max_price = price
        max_idx = i

prices[max_idx] = prices[max_idx]/2
print(int(sum(prices)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# _*_ coding:utf-8 _*_
#  Atcoder_Beginners_Contest115-B
#  https://beta.atcoder.jp/contests/abc115/tasks/abc115_b


def christmasPurchase(intList) :

	intList.sort()
	i = 0
	purchasePrice = 0
	while i < len(intList):
		purchasePrice = purchasePrice + intList[i]
		i = i + 1

	purchasePrice = purchasePrice - intList[-1]//2
	ans = purchasePrice

	return ans


if __name__ == '__main__':

	saleNumber = int(input())
	priceList = [int(input()) for i in range(saleNumber)]
	ans = christmasPurchase(priceList)
	print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

max_item = float(max(grid))

total = sum(grid) - max_item/2
print(int(total))

Submission status: Accepted

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

print(a)

Submission status: Accepted

Solution code:
N=int(input())
ans=0
a=[int(input()) for i in range(N)]
a.sort()
print(sum(a)-a[-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())

a = []
b = 0
c = 0
d = 0

for i in range(N):
    a.append(int(input()))
    if b < a[i]:
        b = a[i]
        c = i
    d += a[i]
print(int(d - a[c] + a[c]/2) )

Submission status: Accepted

Solution code:
n = int(input())
a = [int(input()) for _ in range(n)]
a.sort(reverse=True)

ans = int(a[0]) // 2
a.pop(0)

print(ans + sum(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

N = int(input())

pl = []


for i in range(N):

    pl.append(int(input()))


max = 0

t = 0

for j in range(N):

    if max < pl[j]:
        max = pl[j]
        
    t = t + pl[j]

#print(max)

t = t + (max / 2) - max

print(int(t))

Submission status: Accepted

Solution code:
X = int(input())

li = []

for i in range(X):
        Y = int(input())
        li.append(Y)

a = li.index(max(li))
li[a] = li[a] / 2
print(int(sum(li)))

Submission status: Accepted

Solution code:
num = int(input().strip())

price = []

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

price.sort()

price[num - 1] = price[num -1] / 2

sum = 0

for i in range(num):
	sum = sum + price[i - 1]
		
print(int(sum))

Submission status: Accepted

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

Submission status: Accepted

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

max_i=0
max = prices[0]
for i in range(1,num):
  if prices[i]>max:
    max=prices[i]
    max_i = i
 
sum=0
for i in range(num):
  if i==max_i:
    sum += int(prices[i]/2)
  else:
    sum += prices[i]

print(sum)

Submission status: Accepted

Solution code:
p=0
total=0
max=0
n=input()
while True:
    try:
        p = int(input())
    except EOFError:
        break

    if p > max:
        max = p
    total = total+p

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = sorted(list([int(input()) for _ in range(n)]), reverse=True)

p[0] //= 2

print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
D = int(input())
value = [0]*D
max = 0
total = 0

for i in range(D):
    value[i] = int(input())
    if(max < value[i]):
        max = value[i]

for i in range(D):
    total += value[i]
    
total -= (max/2)
print(int(total))

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())
p = list(map(int, [input() for i in range(n)]))
x = 0
y = 0
m = 0

for i in range(n):
  if x < p[i]:
    x = p[i]
    y = i
    
p[y] = int(x/2)
for i in range(n):
  m += p[i]
  
print(m)

Submission status: Accepted

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

plist.sort
splist = sorted(plist)
splist[-1] = int(splist[-1]/2)

print(sum(splist))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
m = int(input())
ls = []
for i in range(m):
    ls.append(int(input()))
ls = sorted(ls,reverse=True)
ls[0] = ls[0]/2
n=0
for i in range(m):
    n = n + ls[i]
print(int(n))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
l = []
for i in range(n):
    l.append(int(input()))
m = 0
s = 0
for i in l:
    if m<i:
        m = i
        s = l.index(i)

l[s]=l[s]/2
ans = 0
for i in l:
    ans += i
print(int(ans))

Submission status: Accepted

Solution code:
sum = 0
max = 0
count = int(input())
for i in range(count):
 coin = int(input())
 sum = sum + coin
 if coin > max:
  max = coin
print(int(sum - (max/2)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
highest = 0
s = 0
for i in range(N):
    p = int(input())
    global s
    global highest
    s += p
    if p > highest:
        highest = p

print(round(s - highest // 2))

Submission status: Accepted

Solution code:
n = int(input())
p = []
sum = 0
for i in range(n):
    p.append(int(input()))
mp = max(p)
nesage = False
for i in range(n):
    if p[i] == mp and not nesage:
        sum += int(p[i]/2)
        nesage = True
    else:
        sum += p[i]
print(sum)

Submission status: Accepted

Solution code:
a = []
while True:
    try:
        tmp = int(input())
        a.append(tmp)
    except EOFError:
        break
a[0] = 0
b = sorted(a, reverse=True)
b[0] = int(b[0] / 2)
print(sum(b))

Submission status: Accepted

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

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

a=max(p)
q=0
c=0
for i in range(0,len(p)):
    if p[i]==a and c==0 :
        q=q+p[i]/2
        c+=1
    else:
        q=q+p[i]
print(int(q))

Submission status: Accepted

Solution code:
n = int(input())

pr = []
max_c = 0
sum_c = 0

for i in range(n):
    s = int(input())
    pr.append(s)
    if pr[i] >= max_c:
        max_c = pr[i]

    sum_c += pr[i]

sum_c = sum_c - max_c/2

print(int(sum_c))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
n = int(input())
p=[]

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

p.sort()
p.reverse()

x= int(sum(p)-(p[0]/2))

print(x)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

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

Submission status: Accepted

Solution code:
n = int(input())
a = list(map(int, [input() for i in range(n)]))
a.sort()
a.reverse()
total = 0
for i in a:
    total += i
total -= int(a[0]/2)
print(total)

Submission status: Accepted

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

A = sorted(S, reverse=True)

A[0] = A[0]/2

print(int(sum(A)))

Submission status: Accepted

Solution code:
import math

N=int(input())

list=[]

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

max = None
maxinde = None

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

    if max == None:
        max = p
        maxinde = i

    if max < p:
        max = p
        maxinde = i

sum = 0

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

    if i == maxinde:
        sum += math.floor(p/2)
    else:
        sum += p
        
print(sum)

Submission status: Accepted

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

p.sort()
print(sum(p) - p[-1] // 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 = []
g = 0
ans = 0

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

for i in p:
    g += i
    
if p[0] * n == g:
    ans = g - p[0] // 2
else:
    disc = max(p) // 2
    ord = g - max(p)
    ans = disc + ord

print(ans)

Submission status: Accepted

Solution code:
#coding:utf-8

N = int(input())
p = []
max_val = -1
for i in range(N):
    p_i = int(input())
    p.append(p_i)
    max_val = max(max_val, p_i)

s = 0
flag = 0
for p_i in p:
    if p_i == max_val and flag==0:
        s += p_i * 0.5
        flag = 1
    else:
        s += p_i
print(int(s))

Submission status: Accepted

Solution code:
N = int(input())
l=0
list1 = []
for i in range(N):
    x = int(input())
    list1.append(x)
    l += x

y = l - int(max(list1)/2)
print(y)

Submission status: Accepted

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

Submission status: Accepted

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

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

maxP = int(max(p)/2)
p = sorted(p)
ans = 0
for i in range(n-1):
    ans += p[i]
ans += maxP

print(ans)

Submission status: Accepted

Solution code:
n=int(input())
l=[]
s=0
for i in range(1,n+1):
 l.append(int(input()))
l.sort()
for i in l:
 s+=i
print(int(s-0.5*max(l)))

Submission status: Accepted

Solution code:
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:
N = int(input())

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

max_price = max(p)

sum_price = 0
count = 0
for x in p:
    if x == max_price and count == 0:
        sum_price += x // 2
        count += 1
    else:
        sum_price += x

print(sum_price)

Submission status: Accepted

Solution code:
# coding: utf8

if __name__ == "__main__":
    n = int(input())
    num = []
    for _ in range(n):
        num.append(int(input()))
    max_val = max(num)
    print(sum(num) - int(max_val / 2))

Submission status: Accepted

Solution code:
from sys import stdin

N = int(stdin.readline().rstrip())

ls = []
sum = 0

for i in range(1, N+1):
    p = int(stdin.readline().rstrip())
    ls.append(p)

ls = sorted(ls, reverse=True)

sum = ls[0] // 2

for i in range(1, len(ls)):
    sum = sum + ls[i]

print(sum)

Submission status: Accepted

Solution code:
#!/env/usr/python3
n = int(input())
a = []
for i in range(n):
	a.append(int(input()))
	#print(a)

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

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:
import numpy as np
from sys import stdin
N=int(stdin.readline().rstrip())
data=[]
for i in range(N):
    data.append(int(input()))
data[np.argmax(data)]=(max(data)/2)
print(int(sum(data)))

Submission status: Accepted

Solution code:
N = int(input())
list = []
S = 0
for i in range(N):
    list.append(int(input()))
    S += list[i]
print(int(S - max(list)/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]) + int(P[-1]/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N=int(input())
sum=0
max=0
for i in range(N):
    temp=int(input())
    sum+=temp
    if temp > max:
        max = temp
print(str(sum-int(max/2)))

Submission status: Accepted

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

p_max = 0
for i in p:
    p_max = max(p_max, i)

total = sum(p)- p_max/2

print(int(total))

Submission status: Accepted

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

total = 0

for i in p:
    total += i


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

Submission status: Accepted

Solution code:
n = int(input())
#p =[]
max_p = 0
s =0
for i in range(n):
  pi = int(input())
  max_p = max(pi, max_p)
  s += pi
s = s-max_p + max_p//2
print(s)

Submission status: Accepted

Solution code:
N = int(input())
result = []
for idx in range(N):
    result.append(int(input()))
result.sort(reverse=True)
result[0] = int(result[0] / 2)
print(sum(result))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

p_sorted = sorted(p, reverse=True)
p_sorted[0] = p_sorted[0] / 2
ans = int(sum(p_sorted))
print(ans)

Submission status: Accepted

Solution code:
n = input()
n = int(n)
myarray = []
for i in range(n):
        p = input()
        p = int(p)
        myarray.append(p)
darray = sorted(myarray, reverse=True)
sum = darray[0]/2
for k in range(n-1):
        sum = sum + darray[k+1]
print(int(sum))

Submission status: Accepted

Solution code:
N = int(input())
p = []
for i in range(N):
	p.append(int(input()))
S = 0
M = 0
for i in range(N):
	S += p[i]
	if M < p[i]:
		M = p[i]
print(S-(M // 2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n = int(input())
highest_price = 0
sum = 0
for i in range(n):
    product = int(input())
    if highest_price < product:
        sum += highest_price/2
        highest_price = product
        sum += highest_price/2
    else:
        sum += product
print(int(sum))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding:utf-8

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

an.sort()
an.reverse()

sum = 0
for i, ai in enumerate(an):
    if i == 0:
        sum += ai/2
    else:
        sum += ai

print(int(sum))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

sp = sorted(p, reverse=True)
hangaku = (sp.pop(0))/2
sp.append(hangaku)

ans = sum(sp)
print(int(ans))

Submission status: Accepted

Solution code:
count = int(input())

products = []
for i in range(count):
  products.append(int(input()))
  
max_value = max(products)
waribikimae = sum(products)

result = waribikimae - int(max_value/2)

print(result)

Submission status: Accepted

Solution code:
#s = input()
#a, b, c = map(int, input().split())

n = int(input())

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

m = max(list)

#print(list)

list.pop(list.index(m))

#print(list)

sum = 0
for l in list:
    sum += l

sum += m / 2

print(int(sum))
#print(dict[n])

Submission status: Accepted

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

price = 0
for i in range(N-1):
    price += p[i]
price += p[N-1]//2

print(price)

Submission status: Accepted

Solution code:
import math
n=int(input())
p=[]
p.append(int(input()))
pAdded=[p[0]]
pmax=0
pmaxIndex=0
for i in range(1,n):
    p.append(int(input()))
    pAdded.append(pAdded[i-1]+p[i])
    if pmax<p[i]:
        pmaxIndex=i
        pmax=p[i]
print(pAdded[n-1]-math.floor(p[pmaxIndex]/2))

Submission status: Accepted

Solution code:
N = int(input())

max = 0
sum = 0

for i in range(N):
    p = int(input())
    sum += p
    
    if p > max:
        max = p

sum -= max // 2

print(sum)

Submission status: Accepted

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

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

for i in p:
    sum += i
print(sum)

Submission status: Accepted

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

P.sort(reverse=True)
P[0] /= 2
print(int(sum(P)))

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())
p = [int(input()) for _ in range(N)]
P = sorted(p, reverse=True)
sum = 0
for i in range(N):
  sum += P[i]
print(sum-int(P[0]/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());
list = []
for i in range(N):
 list.append(int(input()))
list = sorted(list, reverse=True)
result = 0;
for j in range(N):
 if j == 0:
  result = int(list[j]/2);
 else:
  result = result + list[j];
print(result)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

a.sort(reverse=True)
sum = int(a[0]/2)
for i in range(1,len(a)):
    sum += a[i]

print(sum)

Submission status: Accepted

Solution code:
A = int(input())
P = [int(input()) for i in range(A)]
print(str(sum(P)-int(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)-p[-1]//2)

Submission status: Accepted

Solution code:
import pdb


def main():
    num = int(input())
    price = []
    for i in range(num):
        price.append(int(input()))

    price.sort()
    ans = 0
    loop_num = len(price)
    for i in range(loop_num):
        if i == 0:
            ans += (price.pop()) / 2
        else:
            ans += price.pop()


    print("%d" % ans)

        
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# Christmas Eve Eve

N = int(input().strip())
i = 0
p = []
while i < N:
  pi = int(input().strip())
  p.append(pi)
  i += 1
p = sorted(p)
p[-1] = p[-1]/2
print(int(sum(p)))

Submission status: Accepted

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

Submission status: Accepted

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

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

mx = max(a)
sum = 0
inc = False

for p in a:
	if p == mx and not inc:
		inc = True
		sum += int(p//2)
	else:
		sum += p

print(int(sum))

Submission status: Accepted

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

l_m = max(l)
print("%d" % (sum(l)-l_m/2))

Submission status: Accepted

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

s = 0
max = 0
for p in price:
  if p > max:
    s += max // 2 + p // 2
    max = p
  else:
    s += p

print(s)

Submission status: Accepted

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

sum=0
max = 0
for i in string_list:
    sum = sum + int(i)
    if max < int(i):
        max = int(i)

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