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

Submission status: Accepted

Solution code:
from sys import stdin

N = int(stdin.readline().rstrip())
p = [int(stdin.readline().rstrip()) for _ in range(N)]

m = max(p)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

l = []
for _ in range(n):
  l.append(int(input()))
  
 
l[l.index(max(l))] *= 0.5

print(int(sum(l)))

Submission status: Accepted

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

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

p_max = max(p_arr)

p_sum = sum(p_arr)

print(int(p_sum - p_max/2))

Submission status: Accepted

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

Submission status: Accepted

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

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

I.sort(reverse=True)
I[0] = I[0] // 2

print(sum(I))

Submission status: Accepted

Solution code:
N = int(input())

P = []

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

M = max(P)
P.remove(M)

Tot = M//2

for j in range(N-1):
	Tot += P[j]

print(Tot)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 2019/02/02
# AtCoder Beginner Contest115 - B

# Input
n = int(input())
p = list()
max = 0
sum = 0

# Input and sum
for i in range(n):
    p.append(int(input()))
    if max < p[i]:
        max = p[i]
    sum += p[i]

sum -= int(max / 2)

# Output
print(sum)

Submission status: Accepted

Solution code:
import numpy as np
import math

N = int(input())

A = np.zeros(N, dtype=int)
for i in range(N):
    A[i] = int(input())

# print(N)
# print(A)

sumA = sum(A)

maxA = max(A)

print(sumA - int(maxA/2))

Submission status: Accepted

Solution code:
n = int(input())
p_list = [int(input()) for i in range(n)]
max_p = max(p_list)
max_p_index = p_list.index(max_p)
ans = 0

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

print(ans)

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
import gc

if __name__ == '__main__':
    n=int(input())
    l = list(map(int, [input() for i in range(n)]))
    m = max(l)
    j = l.index(m)
    l[j] = m/2
    print(int(sum(l)))

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 i in range(n)]
p = sorted(p)

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

Submission status: Accepted

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

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
count = int(input())

price = []
for i in range(count):
    price.append(int(input()))
    
price.sort()

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

print sum(price)

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())

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

m = 0
for i in range(N):
    if p[i] > m:
        m = p[i]

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

Submission status: Accepted

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

m=max(p)
for i in range(n):
    if p[i]==m:
        p[i]=int(m)/2
        break

print(int(sum(p)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
pl = list()
for _ in range(n):
    pl.append(int(input()))

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

Submission status: Accepted

Solution code:
def run(N, p):
    return int(sum(p) - max(p) / 2)


def main():
    N = int(input())
    p = []
    for _ in range(N):
        p.append(int(input()))
    print(run(N, p))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
total=0
max=0
i=int(input())
for j in range(i):
  p=int(input())
  total=total+p
  max=max+(p-max)*(max<p)
  
print(int(total-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 = []
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())
p = list(int(input()) for _ in range(n))
print(int(sum(p)-max(p)/2))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

max_p = max(p_list)

cost = sum(p_list) - max_p /2

print(int(cost))

Submission status: Accepted

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

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

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

print(int(sum(P)))

Submission status: Accepted

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

for i in range(N):
    if p[i] > max:
        max = p[i]
        m = i

p[m] = p[m]/2


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

print(int(A))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
maxv = 0
elem = 0
A = []
res = 0
for i in range(n):
    A.append(int(input()))
    maxv = max(maxv,A[i])
    if maxv==A[i]:
        elem = i

for j in range(n):
    if j == elem:
        res += int(A[j]/2)
    else:
        res += A[j]

print(res)

Submission status: Accepted

Solution code:
N = int(input())
p = []
for i in range(N):
        p.append(int(input()))
sum  = 0
max_value = max(p)
p.remove(max_value)

sum += max_value/2

for i in p:
        sum += i

print(int(sum))

Submission status: Accepted

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

Submission status: Accepted

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

sum = 0
max = 0
for p in ps:
  sum += p
  if p > max:
    max = p

sum -= max // 2

print(sum)

Submission status: Accepted

Solution code:
N =int(input())
l =[int(input())for _ in range(N)]
A =max(l)
s = sum(l) -A*0.5
print(int(s))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

prices.sort(reverse=True)

prices[0] = prices[0] / 2

print(int(sum(prices)))

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

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

Submission status: Accepted

Solution code:
# Christmas Eve Eve
n = int(input())
li = []
for _ in range(n):
    li.append(int(input()))
print(sum(li) - max(li)//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:
def main():
  n = int(input())
  l = [int(input()) for i in range(n)]
  print(sum(l) - int((max(l)/2)))

if __name__ == '__main__':
  main()

Submission status: Accepted

Solution code:
#!/usr/bin/python

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

    print(sum(price_list))

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

n = int(stdin.readline().rstrip())
data = [int(stdin.readline().rstrip()) for _ in range(n)]
data = sorted(data, reverse=True)
data[0] *= 0.5
data[0] = int(data[0])

print(sum(data))

Submission status: Accepted

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

max_price = 0
sum_price = 0
for price in prices:
    sum_price += price
    if price > max_price:
        max_price = price

sum_price -= max_price/2

print(int(sum_price))

Submission status: Accepted

Solution code:
n = int(input())

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

Submission status: Accepted

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

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

ans = 0
for i in range(N):
    ans += a[i]

print(int(ans))

Submission status: Accepted

Solution code:
import sys
input()
prices = [int(line.strip()) for line in sys.stdin]
prices = sorted(prices, reverse=True)
prices[0] = prices[0]/2
print(int(sum(prices)))

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 i in range(N)]
print(sum(P)-max(P)//2)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def fastio():
    import sys
    from io import StringIO 
    from atexit import register
    global input
    sys.stdin = StringIO(sys.stdin.read())
    input = lambda : sys.stdin.readline().rstrip('\r\n')
    sys.stdout = StringIO()
    register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()

MOD = 10**9 + 7
I = lambda:list(map(int,input().split()))

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

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

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

print(int(sum(price)))

Submission status: Accepted

Solution code:
from sys import stdin


def main():
    _, *pps = get_params()
    p, *ps = sorted(pps, reverse=True)
    print(solve(p, ps))


def get_params():
    return map(int, read_stdin().split('\n'))


def read_stdin():
    return stdin.read().strip()


def solve(p, ps):
    return p // 2 + sum(ps)


main()

Submission status: Accepted

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

Submission status: Accepted

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

p.sort()
p.reverse()

p[0] /= 2

print(int(sum(p)))

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
n = int(input());
prices = []
for i in range(n):
    p = int(input());
    prices.append(p)
print( int( sum(prices) - max(prices)/2 ) )

Submission status: Accepted

Solution code:
回数 = int(input())
最大値 = 0
i = 0
合計 = 0
while( i < 回数 ):
    価格 = int(input())
    合計 += 価格
    if ( 価格 > 最大値 ):
        最大値 = 価格
    i = i + 1
合計 = 合計 - 最大値/2
print(int(合計))

Submission status: Accepted

Solution code:
n = int(input())

max_value = 0
values = []

while n > 0:
  value = int(input())
  if value > max_value:
    max_value = value
  values.append(value)
  n -= 1
  
price = sum(values) - max_value // 2
print(price)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# -*- coding: utf-8 -*-

# AtCoder Beginner Contest 115：B - Christmas Eve Eve


def main():
    N = int(raw_input().strip())
    P = []
    for _ in range(N):
        p = int(raw_input().strip())
        P.append(p)

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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
N = int(input())
p = []
sum = 0
for i in range(N):
    p.append(int(input()))
M = max(p)
p = sorted(p, reverse=True)
for i in range(N):
    sum += p[i]

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

Submission status: Accepted

Solution code:
pr = int(input())
li =[]

for i in range(pr):
    li.append(int(input()))

disc = max(li) // 2

print(sum(li) - disc)

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

for i in range(N):
    p[i] = int(input())
    max_value = max(max_value, p[i])

price = sum(p) - max_value / 2
print(int(price))

Submission status: Accepted

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

for i in range(n):
  a = int(input())
  p.append(a)
  if max < a:
    max = a

ans = max/2

for i in range(n):
    if p[i] == max:
        p[i] = 0
        break

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

print(int(ans))

Submission status: Accepted

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

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

waribiki=int(max(list)/2)
list.remove(max(list))
list.append(waribiki)

print(sum(list))

Submission status: Accepted

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

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:
#!/usr/bin/env python3

import numpy as np

def main():
    n = int(input())
    pn = [int(input()) for i in range(n)]
    res = int(np.sum(pn)) - int(np.max(pn)) // 2
    print(res)

main()

Submission status: Accepted

Solution code:
# Christmas Eve Eve

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:
n,*p=map(int,open(0).read().split());print(sum(p)-max(p)//2)

Submission status: Accepted

Solution code:
# -*- cording: utf-8 -*-
n = int(input())
a = list(map(int, [input() for x in range(n)]))
sum = 0
a[a.index(max(a))] = max(a) / 2
for x in a:
    sum += x
print(int(sum))

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

answer = sum(prices[0:-1]) + (prices[-1] // 2)
print(answer)

Submission status: Accepted

Solution code:
N = int(input())

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

maxed = max(ps, key=lambda x:x[1])
maxed_index = maxed[0]
ps.pop(maxed_index)

b = maxed[1]/2
for p in ps:
        b += p[1]
print(int(b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

max_i = prices.index(max(prices))
max_half = prices[max_i] // 2

print(sum(prices) - max_half)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Ans = max(p)//2
p.remove(max(p))

Ans += sum(p)
print(Ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

a = []

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

Submission status: Accepted

Solution code:
""" Atcoder """

import sys
input = sys.stdin.readline

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

Submission status: Accepted

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

maxLis = max(lis)
sumLis = sum(lis)
answer = sumLis - maxLis // 2
print(answer)

Submission status: Accepted

Solution code:
n = int(input())
li_p = list()
for i in range(n):
    li_p.append(int(input()))

print(sum(p if idx != 0 else int(p/2) for idx, p in enumerate(sorted(li_p, reverse=True))))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
X = int(input())
s = [int(input()) for i in range(X)]
sum = 0
s.sort()
s.reverse()
for i in range(len(s)):
    if i == 0:
        sum += s[i]/2
    else:
        sum += s[i]


print(int(sum))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#B 
N = int(input())
Price = [int(input()) for i in range(N)]
#print(Price) #
Price.sort()
Price.reverse()
#print(Price)#
Price[0] //= 2
s = sum(Price)
print(s)

Submission status: Accepted

Solution code:
a = int(input())
result = 0
l = sorted([int(input()) for i in range(a)],reverse=True)
m = max(l)/2
l.remove(max(l))
result = result + m + sum(l)
print(int(result))

Submission status: Accepted

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

Submission status: Accepted

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

m = max(list)
sum = sum - m

print(int(m/2) + sum)

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:
# -*- coding: utf-8 -*-
"""
Created on Wed Jan  2 09:53:30 2019

@author: Yamazaki Kenichi
"""

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n=int(input())
i=1
sum=0
max=0
while i <= n:
    ni=int(input())
    sum=sum+ni
    if ni > max:
        max=ni
    i +=1
goke=sum-max/2
print(int(goke))

Submission status: Accepted

Solution code:
n = int(input())
plist = []
for i in range(n):
  plist.append(int(input()))
maxp = max(plist)
ans = sum(plist) - maxp * 0.5
print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#個数
items = int(input())
#価格
price_array = []

#個数の数だけforを回す
for _ in range(items):
    price = int(input())
    price_array.append(price)

price_sum = sum(price_array)
half_price = max(price_array)//2

result = price_sum - half_price
print(result)

Submission status: Accepted

Solution code:
n = int(input())
p = []
for _ in range(n):
  p.append(int(input()))
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)]
p.sort(reverse=True)
s=p[0]//2
for j in range(1,n):
    s+=p[j]
print(s)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

if __name__ == '__main__':
    piyo()

Submission status: Accepted

Solution code:
a = 0
c = 0
for i in range(int(input())):
    b = int(input())
    if b > a:
        c += a
        a = b
    else:
        c += b
c += (a/2)
print (round(c))

Submission status: Accepted

Solution code:
a = int(input())

b = [int(input()) for i in range(a)]
c = sorted(b)

c[-1] = int(c[-1] / 2)

print(sum(c))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

plist2 = np.array(plist)

tf = np.ones(N,dtype='bool')   

tf[plist.index(max(plist))] = False

print(int(sum(plist2[tf]) + max(plist)/2))

Submission status: Accepted

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

m = max(p)
total = 0
for i in p:
    total += i

print(int(total-m/2))

Submission status: Accepted

Solution code:
n = input()
p = [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)]

P.sort()
res = sum(P[0:N-1]) + P[-1] // 2
print(res)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

kakaku = [int(input()) for _ in range(N)]
total = int(sum(kakaku) - (max(kakaku) / 2))
print(total)

Submission status: Accepted

Solution code:
str = input()

list=[]
for i in range (int(str)):
    teika = int(input())
    list.append(teika)
    waribiki=max(list)
    #print(max(list))
    goukei=sum(list)+waribiki/2-waribiki
print(int(goukei))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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


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

Submission status: Accepted

Solution code:
N = int(input())
p_array = []
price_sum = 0
price_max = 0
for _ in range(N):
    price = int(input())
    #都度、足していく
    price_sum += price
    #都度、最大値を更新していく
    price_max = max(price, price_max)

print(price_sum - price_max//2)

Submission status: Accepted

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

#合計
price_sum = sum(p_array)
#最大値の半分の値（/ではなく//を使用しているのはint型にするため）
discount = max(p_array)//2

print(price_sum - discount)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())
p_array = []
for _ in range(n):
  element = int(input())
  p_array.append(element)

price_sum = sum(p_array)
discount = max(p_array)//2

print(price_sum - discount)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
childs = np.array([int(input()) for _ in range(N)])
max_num = 0
discount_index = 0

for x in range(len(childs)):
    if max_num < childs[x]:
        max_num = childs[x]
        discount_index = x

childs[discount_index] = int(childs[discount_index]/2)


print(childs.sum())

Submission status: Accepted

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