Problem:


Score : 200 points

Problem Statement

In some other world, today is the day before Christmas Eve.

Mr. Takaha is buying N items at a department store. The regular price of the i-th item (1 \leq i \leq N) is p_i yen (the currency of Japan).

He has a discount coupon, and can buy one item with the highest price for half the regular price. The remaining N-1 items cost their regular prices. What is the total amount he will pay?

Constraints

2 \leq N \leq 10

100 \leq p_i \leq 10000

p_i is an even number.

Input

Input is given from Standard Input in the following format:

N
p_1
p_2
:
p_N

Output

Print the total amount Mr. Takaha will pay.

Sample Input 1

3
4980
7980
6980

Sample Output 1

15950

The 7980-yen item gets the discount and the total is 4980 + 7980 / 2 + 6980 = 15950 yen.

Note that outputs such as 15950.0 will be judged as Wrong Answer.

Sample Input 2

4
4320
4320
4320
4320

Sample Output 2

15120

Only one of the four items gets the discount and the total is 4320 / 2 + 4320 + 4320 + 4320 = 15120 yen.



Sample input:
3
4980
7980
6980


Sample output:
15950

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
prices = []
for i in range(n):
	prices.append(int(input()))
prices.sort(reverse=True)
print(int(sum(prices) - 0.5*prices[0]))

Submission status: Accepted

Solution code:
#! /usr/bin/env python3
# -*- coding: utf-8 -*-
N = int(input())
p = []
for _ in range(N):
    p.append(int(input()))

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

Submission status: Accepted

Solution code:
N = int(input())
D = []
for i in range(1, N + 1):
    pi = int(input())
    D.append(pi)
a = max(D)
b = sum(D)
ans = int(a / 2 + b - a)
print(ans)

Submission status: Accepted

Solution code:
from sys import stdin
n = int(stdin.readline().rstrip())
data = [stdin.readline().rstrip() for _ in range(n)]
data = [int(l) for l in data]
data.sort()
data[-1] = int(data[-1]/2)
print(sum(data))

Submission status: Accepted

Solution code:
import sys
import math


# get from std-I/O.
def loading_inputs():

    data = {"N":0, "S":list()}
    N = raw_input()
    N = int(N)

    P = list()
    for i in xrange(N):
        p_i = raw_input()
        p_i = int(p_i)
        P.append(p_i)

    data["N"] = N
    data["P"] = P

    return data


def calc_payment(max_p, p_remain):

    total = 0

    max_pay = math.ceil(max_p/2)
    remain_pays = sum(p_remain)
    total = int(max_pay + remain_pays)
    return total



def main():

    ans  = 0
    inputs = loading_inputs()
    P = sorted(inputs["P"])
    N = inputs["N"]

    max_p    = P[N-1]
    remain_p = P[:N-1]
    ans = calc_payment(max_p, remain_p)
    print ans



if __name__ == "__main__":
    main()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc115/tasks/abc115_b
n = int(input())
p = []
for _ in range(n):
    p.append(int(input()))
p.sort()
p[-1] = int(p[-1] * 0.5)
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

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:
def christmas_eve_eve(N: int, P: list) -> int:
    p_max = max(P)
    return sum(P) - (p_max // 2)


if __name__ == "__main__":
    N = int(input())
    P = [int(input()) for _ in range(N)]
    ans = christmas_eve_eve(N, P)
    print(ans)

Submission status: Accepted

Solution code:
N, = (int(x) for x in input().split())
p_arr = []
for _ in range(N):
    p_arr.append(int(input()))

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

ans = 0
for p in p_arr:
    ans += p

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

p.sort(reverse=True)

ans = p[0] // 2

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

print(ans)

Submission status: Accepted

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

max_p = max(pi)
ans = sum(pi) - max_p + max_p // 2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

total = list[0]/2

for i in list[1:]:
    total += i

print(int(total))

Submission status: Accepted

Solution code:
N = int(input())
pLs=[]
for n in range(0,N):
    pLs.append(int(input()))

pLs.sort(reverse = True)

sm = 0
pLs[0] = int(pLs[0]/2)
for n in range(0,N):
    sm += pLs[n]

print(sm)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import numpy as np

N = int(input())
ps = np.zeros(N)

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

SUM = ps.sum() - ps.max()/2
print(int(SUM))

Submission status: Accepted

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

psum = sum(ps) - int(max(ps) / 2)
print(psum)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ri = lambda: int(input())
rl = lambda: list(map(int,input().split()))

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())
highest = 0
sum = 0
for i in range(N):
  x = int(input())
  sum += x
  if x >= highest:
    highest = x
print(sum - (highest)//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())
price=[]
for i in range(n):
    price.append(int(input()))
print(sum(price)-max(price)//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
i = 0
N = []
while i < n:
  N.append(int(input()))
  i += 1
  
mep = max(N)
idm = N.index(mep)
N[idm] = mep /2

price = sum(N)
price = int(price)

print(price)

Submission status: Accepted

Solution code:
import math

N = int(input())
p = []
total = 0

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

p = sorted(p)
p[N - 1] = math.floor(p[N - 1] / 2)

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

print(total)

Submission status: Accepted

Solution code:
_,*p=map(int,open(0).readlines());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(p[0]//2+sum(p[1:]))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

price = []

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

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

Submission status: Accepted

Solution code:

n=int(input())

ar=[]
for i in range(0,n):
	k=int(input())
	ar.append(k)

ar.sort()
k=ar[n-1]//2
for i in range(0,n-1):
	k+=(ar[i])
print(k)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

p = [int(input()) for _ in range(N)]
maxp = max(p)
print(int(sum(p) - maxp*0.5))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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)
index  = np.argmax(p)
p[index] = p[index]/2
print(int(sum(p)))

Submission status: Accepted

Solution code:
n=int(input())

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#cording: utf-8

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

max_val = max(p)
max_ind = p.index(max_val)
p[max_ind] = p[max_ind]/2

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

print(int(sum))

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


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

print(ans)

Submission status: Accepted

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

price.sort()
total_price = sum(price[0:N-1]) + int(price[-1]/2)

print(total_price)

Submission status: Accepted

Solution code:

# coding: utf-8

# In[13]:


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


# In[14]:


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())

max_price = 0
sum_price = 0

for _ in range(n):
  p = int(input())
  if max_price < p:
    max_price = p
  sum_price += p

print(sum_price - max_price // 2)

Submission status: Accepted

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

Submission status: Accepted

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

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

list_std = sorted(list)

highest = list_std[n-1]
highest //= 2
price = 0

for j in range(n-1):
    price += list_std[j]

print(int(highest+price))

Submission status: Accepted

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

maxP = max(P)
sumP = 0
for i in range(N):
    sumP += P[i]

print(sumP-maxP//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())
a = [int(input()) for i in range(n)]
rich = a[0]
for i in range(1,n):
    if a[i] > rich:
        rich = a[i]
print(sum(a) - rich//2)

Submission status: Accepted

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

pmax = p.index(max(p))

p[pmax] /= 2

print(int(sum(p)))

Submission status: Accepted

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

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())
l = []
sum = 0

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

l.sort(reverse=True)
sum += l[0] / 2

for j in l[1:]:
    sum += j

print(int(sum))

Submission status: Accepted

Solution code:
from functools import reduce
from operator import add
n = int(input())

p = []

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

sp = sorted(p, reverse=True)

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

ans = reduce(add, sp)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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:
# -*- coding: utf-8 -*-
# スペース区切りの整数の入力

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

m = max(p)
p.remove(m)
p.append(m / 2)

print("%d" % sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

p.sort(reverse=True)
p[0] /= 2
sum = 0
for i in p:
    sum += i

print(math.floor(sum))

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
item_num = int(input())

price_list = []
for i in range(item_num):
    price_list.append(int(input()))

highest_price = max(price_list)

for i in range(item_num - 1):
    if price_list[i] == highest_price:
        price_list[i] = int(highest_price / 2)
        break

print(sum(price_list))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# B
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:
def calc_payment(p):
        max_p = 0
        sum_p = 0
        for p_v in p:
                max_p = max(max_p, p_v)
                sum_p += p_v
        return sum_p - (max_p // 2)


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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, = map(int,input().split())
maxp = 0
total = 0
for i in range(n):
  p, = map(int,input().split())
  if(p>maxp):
    maxp = p
  total += p
print(total - maxp//2)

Submission status: Accepted

Solution code:
N = int(input())
kaimono_list = []
for i in range(N):
    kaimono_list.append(int(input()))
for i in range(N-1):
    for j in range(N):
        if i < j:
            if kaimono_list[i] > kaimono_list[j]:
                a = kaimono_list[i]
                kaimono_list[i] = kaimono_list[j]
                kaimono_list[j] = a
kaimono_sum = 0
for i in kaimono_list:
    kaimono_sum += i
print(kaimono_sum - kaimono_list[N-1]//2)

Submission status: Accepted

Solution code:
# https://atcoder.jp/contests/abc115/tasks/abc115_b

N = int(input())

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

p.sort()

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

print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

print(sum(data_list))

Submission status: Accepted

Solution code:
from sys import stdin

N, *p = map(int, stdin.read().split())

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

Submission status: Accepted

Solution code:
N = int(input())
p = [0]*N
index = -1
max_value = 0
for i in range(N):
    p[i] = int(input())
    if(p[i]>max_value):
        max_value = p[i]
        index = i
p[index] = int(p[index]/2)
print(sum(p))

Submission status: Accepted

Solution code:
n = int(input())
costs = list()

for i in range(n):
    costs.append(int(input()))
    
costs[costs.index(max(costs))] = int(costs[costs.index(max(costs))]/2)

print(sum(costs))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    present_count = int(input())
    present = []
    total_count = 0
    for n in range(present_count):
        p_price = int(input())
        present.append(p_price)

    max_price_index = present.index(max(present))
    present[max_price_index] = present[max_price_index] / 2

    for price in present:
        total_count += price

    print(int(total_count))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

main()

Submission status: Accepted

Solution code:
N = int(input())

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

p.sort()

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

ans += p[N - 1] // 2
print(ans)

Submission status: Accepted

Solution code:
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools


sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]


def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()
def pf(s): return print(s, flush=True)


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

    highest = max(p)
    del p[p.index(highest)]
    result = highest / 2 + sum(p)
    print(int(result))

main()

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

p.sort()

p[n] = p[n]//2

print(sum(p))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
x = []
sum = 0

for i in range(n):
    x.append(int(input()))
    
for i in range(len(x)):
    sum += x[i]
    
print(round(sum - (max(x)/2)))

Submission status: Accepted

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

max_num = max(line)
sum_num = sum(line) - max_num / 2
print(int(sum_num))

Submission status: Accepted

Solution code:
N = int(input())
Price = []
maxPrice = 0
sumTotal = 0
for i in range(N):
    priceCurrent = int(input())
    Price.append(priceCurrent)
    if priceCurrent > maxPrice:
        maxPrice = priceCurrent
    sumTotal += priceCurrent
sumTotal -= int(maxPrice/2)
print(sumTotal)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from heapq import heappush, heappop

class Solver(object):
    def __init__(self):
        self.n = int(input())
        self.items = list()
        for _ in range(self.n):
            heappush(self.items, int(input()))

    def solve(self):
        total = 0
        for _ in range(self.n - 1):
            total += heappop(self.items)
        total += heappop(self.items) / 2
        print (int(total))


if __name__ == "__main__":
    s = Solver()
    s.solve()

Submission status: Accepted

Solution code:
#ABC115B-ChristmasEveEve.py

from sys import stdin

input = stdin.readline

N = int(input())

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

pmax = max(p)

total = sum(p) - int(pmax / 2)

print(total)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
num = int(input())
list = sorted([int(input()) for _ in range(num)])

list[-1] = math.floor(list[-1]/2)

print(sum(list))

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
n =int(input())
a = [int(input()) for _ in range(n)]
print(int(sum(a)-max(a)/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())
Pn = [int(input()) for i in range(N)]
Pn.sort(reverse=True)
ans = sum(Pn) - Pn[0]//2
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys;t = [int(l) for l in sys.stdin];t=t[1:t[0]+1];print(int(sum([i for c,i in enumerate(t) if c != t.index(max(t))]) + max(t) /2))

Submission status: Accepted

Solution code:
LINE=input()
n=LINE
ans=0
b=1
for i in range(0,int(n)):
  a=input()
  ans=int(a)+ans
  if int(a)>b:
    b=int(a)
print(int(ans-int(b)/2))

# input() -> read a line as a string
# s.split() -> split s by whitespace
# a, b = [3, 4] -> a = 3, b = 4

Submission status: Accepted

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

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

price = sorted(price, reverse = True)

sum = int(price[0] / 2)

for i in range(1, n_item):
  sum += price[i]
  
print(sum)

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(int(np.sum(p) - np.max(p)/2))

Submission status: Accepted

Solution code:
line = int(input())
list =[]
for i in range(line):
    list.append(int(input()))
max = max(list)
list.remove(max)
S = max // 2 + sum(list)
print(S)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())

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

p.sort(reverse=True)

max_val = p.pop(0) / 2
print(int(sum(p) + max_val))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
from operator import itemgetter

# N, K = map(int, input().split())
# h = list(map(int, input().split()))
# S = [input() for _ in range(H)]
# X = [[0 for j in range(100)] for i in range(200)]


def solve(a):
	a = sorted(a, reverse = True)
	ans = a[0] // 2
	for i in range(1, len(a)):
		ans += a[i]
	print(ans)

if __name__ == '__main__':
	### input
	n = int(input())
	arr = []
	for i in range(n):
		arr.append(int(input()))
	###solve
	solve(arr)

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:
from collections import defaultdict, Counter
from itertools import product, groupby, count, permutations, combinations
from math import pi, sqrt
from collections import deque
from bisect import bisect, bisect_left, bisect_right
from string import ascii_lowercase
from functools import lru_cache
import sys
sys.setrecursionlimit(10000)
INF = float("inf")
YES, Yes, yes, NO, No, no = "YES", "Yes", "yes", "NO", "No", "no"
dy4, dx4 = [0, 1, 0, -1], [1, 0, -1, 0]
dy8, dx8 = [0, -1, 0, 1, 1, -1, -1, 1], [1, 0, -1, 0, 1, 1, -1, -1]


def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


def ceil(a, b):
    return (a + b - 1) // b


# aとbの最大公約数
def gcd(a, b):
    if b == 0:
        return a
    return gcd(b, a % b)


# aとbの最小公倍数
def lcm(a, b):
    g = gcd(a, b)
    return a / g * b


def main():
    N = int(input())
    P = list(sorted([int(input()) for _ in range(N)], reverse=True))
    print(sum(P) - P[0] + P[0] // 2)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

def main():
  input = sys.stdin.readline
  N = int(input())
  P = [int(input()) for _ in range(N)]
  Ph = max(P)
  ans = Ph // 2 + sum(P) - Ph
  print(ans)


if __name__ == '__main__':
  main()

Submission status: Accepted

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

Submission status: Accepted

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

def main():
  n = int(input())
  li = [int(input()) for _ in range(n)]
  li.sort()
  print(int(sum(li) - li[-1]/2))
  pass

if __name__=='__main__':
  main()

Submission status: Accepted

Solution code:
# encoding:utf-8

import copy
import numpy as np
import random

n = int(input())

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

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

print(answer)

Submission status: Accepted

Solution code:
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	x,y = map(int,input().split())	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = list(map(int,input().split()))	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']

# 3
# hoge
# foo
# bar
# n=int(input())
# string_list=[input() for i in range(n)]
n=int(input())
p=[int(input()) for _ in range(n)]

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