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())
pi = sorted([int(input()) for _ in range(N)])
pi[-1] //= 2
print(sum(pi))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

ans = []

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
num = int(input())
x = [int(input()) for n in range(num)]
x = sorted(x)
answer = 0
for n in x:
    answer += n
print(int(answer - x[-1]/2))

Submission status: Accepted

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

i = prices.index(max(prices))
prices[i] = math.ceil(prices[i]/2)

def wa(list):
    a = 0
    for i in range(len(list)):
        a = a+list[i]
    return a

print(wa(prices))

Submission status: Accepted

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

m = max(p)/2

c = sum(p) - m

print(int(c))

Submission status: Accepted

Solution code:
N = int(input())
pi = [0]*N
sum = 0
for i in range(N):
    pi[i] = int(input())
maxprice = max(pi)
for i in range(N):
    if pi[i] == maxprice:
        pi[i] /= 2
        break
for i in range(N):
    sum += pi[i]
print(int(sum))

Submission status: Accepted

Solution code:
n=int(input())

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


price=sum(pr)-max(pr)*0.5

print(int(price))

Submission status: Accepted

Solution code:
n=int(input())

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

price=0
for i in range(n-1):
    price+=sorted(pr)[i]
price+=sorted(pr)[-1]*0.5
    
print(int(price))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

item.sort(reverse=True)
ans = (item[0]/2) + sum(item[1:])

print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
maxi = 0
res = 0
for i in range(n):
    a = int(input())
    res += a
    if a > maxi:
        maxi = a

print(res - maxi // 2)

Submission status: Accepted

Solution code:
a = int(input())
b = []
for i in range(a):
  b.append(int(input()))
print(int(sum(b)-max(b)/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:
n = int(input())
p = [int(input()) for i in range(n)]
p_max = p[0]
for j in range(1, n):
    if p[j] >= p_max:
        p_max = p[j]
for k in range(n):
    if p[k] == p_max:
        p[k] = int(p[k] / 2)
        break
print(sum(p))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N=int(input())
# list(map(int,input().split()))
inl = [int(input()) for i in range(N)]
inl.sort()

print(sum(inl[:N-1])+inl[N-1]//2)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
P = []
ma = 0
for i in range(N):
    p = int(input())
    P.append(p)
    ma = max(ma, p)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = list(range(n))

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

Submission status: Accepted

Solution code:
N = int(input())
ans = 0
ma = 0

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

ans -= ma // 2

print(ans)

Submission status: Accepted

Solution code:
N = int(input())
max_item = 0
sum_item = 0
for _ in range(N):
  c = int(input())
  sum_item += c
  max_item = max(c, max_item)

sum_item -= max_item // 2 
print(sum_item)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
p = [[] for _ in range(N)]
for i in range(N):
    p[i] = list(map(int, input().split()))
All = []
for v in p:
    for _v in v:
        All.append(_v)
All.sort(reverse=True)
highest = All.pop(0)
total = highest/2
for value in All:
    total += value
print(int(total))

Submission status: Accepted

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

P.sort()

ans = sum(P) - P[-1]
ans += P[-1]//2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np
N = int(stdin.readline().rstrip())
P = np.array([int(stdin.readline().rstrip()) for _ in range(N)])
P = np.sort(P)
P = P[::-1]
P[0] = int(P[0] / 2)
print(np.sum(P))

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

Submission status: Accepted

Solution code:
a = int(input())
list_  = []
for i in range(a):
    b = int(input())
    list_.append(b)
s = max(list_)
list_.remove(s)
list_.append(s // 2)

print(sum(list_))

Submission status: Accepted

Solution code:

N = int(input())

p_max = 0
p_sum = 0

for i in range(N):

    p = int(input())
    p_sum += p

    if p > p_max:
        p_max = p

p_sum -= int(p_max / 2)

print(p_sum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

total = 0
for value in p:
  total = total + value

print(total)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

Solution code:
n = int(input())
ans = 0
d = 0
for _ in range(n):
    p = int(input())
    ans += p
    d = max(d, p // 2)

print(ans - d)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
P = []
for n in range(N):
  P.append(int(input()))
p_mx = max(P)
P.remove(p_mx)
print(int(p_mx/2 + sum(P)))

Submission status: Accepted

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


def solve(N: int, P: "List[int]"):
    P.sort(reverse=True)
    print(int(P[0]/2 + sum(P[1:])))

    return


# Generated by 1.1.4 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())
sum = 0
m = 0
for i in range(n):
    p = int(input())
    sum += p
    m = max(p, m)
sum -= m/2
print(int(sum))

Submission status: Accepted

Solution code:
n=int(input())
p=[int(input())for i in range(n)]
maxp=p.pop(p.index(max(p)))
ans=0
for i in p:
  ans=ans+i
ans=ans+maxp//2
print(ans)

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

Submission status: Accepted

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

Submission status: Accepted

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

P.sort()
print(int(P[n-1]/2) + sum(P[:n-1]))

Submission status: Accepted

Solution code:
# coding: utf-8

n = int(input())

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

print(x)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys


def input():
    return sys.stdin.readline()[:-1]

# N = int(input())
# A = [int(x) for x in input().split()]
# a, b, c = map(int, input().split())
# name1 = str(input())
# alph = {"A": 1, "B": 2, "C": 3, "D": 4, "E": 5}
# b = list(map(lambda x: math.ceil(x/10)*10, a))


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

Submission status: Accepted

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

Submission status: Accepted

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

ans = sum(List) - max(List)//2

print(ans)

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 += int(p[i]/2)
    else:
        ans += p[i]
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())
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 = []
for i in range(N):
    p_list.append(int(input()))
p_list.sort()
p_list[-1] = p_list[-1]//2
print(sum(p_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from __future__ import print_function
import numpy as np
import sys
import math,string,itertools,fractions,heapq,collections,re,array,bisect,copy,functools
# from itertools import accumulate
# from collections import deque
import random

def eprint(*args, **kwargs):
    print(*args, file=sys.stderr, **kwargs)

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a = int(input())
list1 = [int(input()) for i in range(a)]
num = max(list1) / 2
list1.remove(max(list1))
print(int(sum(list1)+num))

Submission status: Accepted

Solution code:
#ABC 115 B
n = int(input())
price_list = []
for i in range(n):
    price = int(input())
    price_list.append(price)
max_price = max(price_list)
price_list.remove(max_price)
price_list.append(max_price/2)
print(int(sum(price_list)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
n=int(input())
ans=0
m=0
for i in range(n):
    t=int(input())
    if(t>m):
        m=t
    ans+=t
print(round(ans-m/2))

Submission status: Accepted

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

Submission status: Accepted

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

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

list=[]

for i in range(n):
  list.append(int(input()))
  
print(int(sum(list)-max(list)/2))

Submission status: Accepted

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

Submission status: Accepted

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

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

p_list.sort()
p_list.reverse()

p_list[0] = p_list[0] // 2

print(sum(p_list))

Submission status: Accepted

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

Submission status: Accepted

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

N = int(input())
L = [int(input()) for _ in range(N)]
ma = max(L)

s = 0
f = True
for v in L:
    if ma == v and f:
        f = False
        s += v // 2
    else:
        s += v
        
print(s)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
p = []
ans = 0
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())
p = [int(input()) for _ in range(N)]

max_value = max(p)
p.remove(max_value)

print(int(max_value/2) + sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

p_max = max(p)
p_sum = sum(p) - p_max
p_max *= 0.5

print(int(p_sum + p_max))

Submission status: Accepted

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

s_p = sorted(p)

total = 0
for i in range(N-1):
    total = total + s_p[i]

total = total + int(s_p[N-1]/2)

print(total)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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:
n = int(input())

p =[0]
for i in range(n):
    a = int(input())
    if a > p[0]:
      p.insert(0, a)
    else:
      p.append(a)
      
p[0] //= 2

print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np
n = int(input())
arr = [int(input()) for _ in range(n)]
arg_m = np.argmax(arr)
total = (arr.pop(arg_m)//2) + sum(arr)
print(total)

Submission status: Accepted

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

total = max(item) / 2 + sum(item) - max(item)
print(round(total))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

n = int(input())
A = []
A = [int(input()) for i in range(n)]
s = 0
s += sum(A) - max(A)/2
print(int(s))

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:
import functools
from operator import add
N = int(input())
A = [int(input()) for i in range(N)]

A_max = max(A)
A.remove(A_max)
A.append(A_max//2)

print(functools.reduce(add,A))

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
products = [int(input()) for i in range(N)]
#print(products)

S = int(max(products) / 2)
index = products.index(max(products))
products.pop(index)
S += sum(products)
print(S)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = 0
for i in range(N):
    if p[i] == max(p):
       ans += int(p[i]/2)
       p.append(max(p) + 1)
    else:
        ans += p[i]

print(ans)

Submission status: Accepted

Solution code:
cnt=0
N=int(input())
p=[]
import sys
for i in sys.stdin.readlines():
  p.append(int(i.rstrip()))
p.sort(reverse=True)
p[0]=p[0]/2
print(int(sum(p)))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
sum = 0
max_value = 0
for i in range(N):
    tmp = int(input())
    sum += tmp
    max_value = max(max_value, tmp)

print('{0:.0f}'.format(sum - max_value / 2))

Submission status: Accepted

Solution code:
from sys import stdin
import numpy as np

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

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

print(int(ans))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
N = int(input())
p = [ int(input()) for _ in range(N)]
m = max(p)//2
p[p.index(max(p))] = 0
print(sum(p)+m)

Submission status: Accepted

Solution code:
N = int(input())

L = []

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

sale = int(max(L) / 2)
sum = 0

for i in L : 
    sum += i
    
sum -= sale

print(sum)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

current = 0
curmax = -1

for _ in range(N):
    item = int(input())

    current += item
    curmax = max(curmax, item)


current -= int(curmax / 2)

print(current)

Submission status: Accepted

Solution code:
import numpy as np
kosuu = int(input())
kakakulist=[]
for i in range(kosuu):
  kakaku=int(input())
  kakakulist.append(kakaku)

saidai=max(kakakulist)

kotaesyou=sum(kakakulist)-saidai/2
kotae=round(kotaesyou)

print(kotae)

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())
A=[int(input()) for i in range(n)]
cnt=0

for i in range(n):
  cnt+=A[i]
cnt-=max(A)*0.5
print(int(cnt))

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())
s = 0
m = 0
for i in range(N):
  inline = int(input())
  s += inline
  m = max(m, inline)
print(int(s-(m/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:
#!/usr/bin/env python3
import sys
from math import *
from itertools import *
from collections import *
from functools import *
try:
    from math import gcd
except Exception:
    from fractions import gcd


def solve(N: int, p: "List[int]"):
    p.sort()
    return sum(p[:-1]) + (p[-1] // 2)


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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
pLst.sort(reverse=True)
for i in range(1, N):
    ans += pLst[i]

ans += int(pLst[0] / 2)
print(ans)

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())
Prices = sorted([int(input()) for i in range(N)] ,reverse = True)
print(Prices[0]//2 + sum(Prices[1:]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

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

d = max(a) / 2

print(int(sum(a) - d))

Submission status: Accepted

Solution code:
N = int(input())

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

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

Submission status: Accepted

Solution code:
n = int(input())
p = list(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):
    p.append(int(input()))

m = max(p)
sum = 0
for j in range(n):
    sum += p[j]

print(int(sum - m/2))

Submission status: Accepted

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

for i in range(n):
    x = int(input())
    p.append(x)
    
p.sort()
print(int(sum(p) - max(p)*0.5))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

mxp = max(p)

answer = sum(p)-mxp//2

print(answer)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
P = [int(input()) for i in range(N)]
X = max(P)
P.remove(X)
T = X / 2
for j in range(N - 1):
    T += P[j]

T = int(T)
print(T)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

for _ in range(N):
	arr.append(int(input()) )

print (sum(arr) - int(max(arr)/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:
a=sorted( [int(input()) for _ in range(int(input()))] )
a[len(a)-1] //= 2
print(sum(a))

Submission status: Accepted

Solution code:
N = int(input())
P = [int(input()) for i in range(N)]
maxprice = max(P)
sum = 0
ticket = True
for i in P:
    if(i != maxprice):
        sum += i
    elif(ticket):
        sum += i / 2
        ticket = False
    else:
        sum += i
print(int(sum))

Submission status: Accepted

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

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:
# ABC115B - Christmas Eve Eve
n = int(input())
lst = sorted(list(map(int, [input().rstrip() for _ in range(n)])))
print(sum(lst) - lst[-1] // 2)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

print(sum(P))

Submission status: Accepted

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

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