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

max_value = max(*p)
taken_max = False
sum = 0

for v in p:
    if v == max_value and not taken_max:
        taken_max = True
        sum += v / 2
    else:
        sum += v

print(int(sum))

Submission status: Accepted

Solution code:
N = int(input())
l = []
for i in range(N):
  p = int(input())
  l.append(p)
l.sort()
M = l.pop()
print(sum(l) + M // 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:
p=[int(input()) for _ in range(int(input()))]
num=sorted(p,reverse=True)
print(int(num[0]/2+sum(num[1::])))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

P.sort(reverse=True)

P[0] //= 2
print(sum(P))

Submission status: Accepted

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

p = sorted(p)
p[len(p)-1] = p[len(p)-1]//2

print(sum(p))

Submission status: Accepted

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

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()))
  
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)
y = 0
for i, j in enumerate(p):
  if j == x:
    p[i] = p[i] / 2
    break
total = 0

for i in p:
  total += i
print(int(total))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = int(input())
pl = list(int(input()) for _ in range(n))
pl_s = sorted(pl, reverse=True)

price = pl_s.pop(0)//2 + sum(pl_s)
print(price)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

p = sorted(p, reverse=True)
print(int(p[0]/2) + sum(p[1:]))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
n = int(readline())
p = [int(input()) for i in range(n)]
p.sort()
print(sum(p)-p[-1]//2)

Submission status: Accepted

Solution code:
import sys
import math
import itertools

n=int(input())
p=[]

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

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

print(sum(p))

Submission status: Accepted

Solution code:
# easy!!!

n = int(input())
l = [int(input()) for x in [0] * n]
l.sort()
a = l[-1]/2 + sum(l[0:-1])
print(int(a))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
INT = lambda: int(INPUT())

sys.setrecursionlimit(10 ** 9)


def main():
    N = INT()

    ans = 0
    high = INT()
    for i in range(N-1):
        P = INT()
        if P < high:
            ans += P
        else:
            ans += high
            high = P

    print(ans + high//2)


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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:
def main():
    N = int(input())
    prices = []
    for _ in range(N):
        prices.append(int(input()))
    prices.sort()
    cost = 0
    for i in range(N - 1):
        cost += prices[i]
    cost += prices[-1] // 2
    print(cost)


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
n = int(input())

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

p.sort()

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

print(int(ans + p[n-1]/2))

Submission status: Accepted

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

Submission status: Accepted

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

maxprice = max(p)

ans = 0
for i in range(n):
    if maxprice == p[i]:
        ans += maxprice // 2
        maxprice = 0
    else:
        ans += p[i]

print(ans)

Submission status: Accepted

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

List = sorted(List)

l = len(List)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

max_price = prices.pop(prices.index(max(prices)))

print(sum(prices) + max_price // 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())
a = [int(input()) for i in range(n)]
print(sum(a) - max(a) // 2)

Submission status: Accepted

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

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

print(int(sum(resultList)))

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

Submission status: Accepted

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

ans = sum(P) - highest // 2

print(ans)

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 16, Jan, 2020
"""

import sys
import numpy as np

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N = int(readline())
P = list(map(int, read().split()))

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

Submission status: Accepted

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

pd = int(max(p)/2)
s = sum(p)

print(s - pd)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n, *D, = [int(s.split()[0]) for s in open(0)]
max_p = max(D)
total = max_p // 2
D.remove(max_p)
total += sum(D)
print(total)

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:

a = list(int(input()) for _ in range(int(input())))
a.sort()
print(int(sum(a)-a[-1]/2))

Submission status: Accepted

Solution code:

n = int(input())
P = []
ans = 0

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

P.sort()
#print(P)

for i in range(len(P)-1):
    ans += P[i]
#    print(ans)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

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

def main():
    return sum(p) - max(p) // 2

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**9)
INF=10**18
MOD=10**9+7
def input():
    return sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

p.sort()
ans = p[-1]//2
p.pop()
ans += sum(p)
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())
p = list(int(input()) for _ in range(n))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
#A, B, C, D = map(int, input().split())
#L = list(map(int, input().split()))
#S = list(str(input()))
N = int(input())
P = []
for _ in range(N) :
  P.append(int(input()))
#print (P)
P.sort(reverse=True)
P[0] /= 2
print (int(sum(P)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

def main():
    N = int(input())
    s = [int(input()) for _ in range(N)]
    
    M = max(s)
    print(sum(s)-M//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())
print(sum(p) - max(p) // 2)

Submission status: Accepted

Solution code:
import bisect
import cmath
import heapq
import itertools
import math
import operator
import os
import re
import string
import sys
from collections import Counter, deque, defaultdict
from copy import deepcopy
from decimal import Decimal
from fractions import gcd
from functools import lru_cache, reduce
from operator import itemgetter, mul, add, xor

import numpy as np

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(10 ** 9)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7
# MOD = 998244353

N =int(sys.stdin.buffer.readline())
P = [int(sys.stdin.buffer.readline()) for _ in range(N)]


P = np.array(P, dtype=int)
ans = P.sum() - P.max() // 2
print(int(ans))

Submission status: Accepted

Solution code:
# coding: utf-8

itemCount = int(input())

itemList = sorted([ int(input()) for i in range(itemCount)])
itemList.reverse()

ans = sum(itemList) - int(itemList[0] / 2)
print(ans)

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

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

max_num_price = sorted(p)[-1] // 2
sum_otehrs = sum(sorted(p)[: -1])
print(max_num_price + sum_otehrs)

Submission status: Accepted

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

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())
l = [None]*N

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

max_l = max(l)

print(max_l//2 + sum(l)- max_l)

Submission status: Accepted

Solution code:
n = int(input())

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

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

Submission status: Accepted

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

li[-1] = li[-1]//2

print(sum(li))

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
N = int(input())
li = [0]*N
for i in range(N):
    li[i] = int(input())
a = max(li)
li.remove(li[li.index(a)])
print(a//2+sum(li))

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!
N=int(input())
P=[0]*N
for i in range(N):
    P[i]=int(input())
ans=int(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.sort()
p[-1] = int(p[-1] * 0.5)
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import math

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

Submission status: Accepted

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

Submission status: Accepted

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

m = max(p)

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

ans = 0
max = 0

p.sort()
for i in range(len(p) - 1):
        ans += p[i]
ans += p[-1] // 2
print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
N = int(input())
p = []
for i in range(N):
    p.append(int(input()))

p.sort()
p[N - 1] = p[N - 1] / 2
print(int(sum(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:
n=int(input())
p=[int(input()) for _ in range(n)]
print(sum(p)-max(p)//2)

Submission status: Accepted

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

p_list.sort()
kari = sum(p_list)
print(int(kari - (p_list[-1]/2)))

Submission status: Accepted

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

Submission status: Accepted

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

p = list([int(input()) for _ in range(n)])
ret = sum(p)-max(p)//2

print(ret)

Submission status: Accepted

Solution code:
n=int(input())
p=[]
for i in range(n):
    p.append(int(input()))
p.sort()
print(sum(p)-p[len(p)-1]//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 = []
for _ in range(N):
    p.append(int(input()))
p = sorted(p)
p[-1] = p[-1]//2
print(sum(p))

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
import numpy as np
N = int(input())
p = []
for _ in range(N):
    p.append(int(input()))
p = sorted(p)
p[-1] = p[-1]//2
print(sum(p))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a,*n=map(int,open(0));print(int(sum(n[:])-max(n)/2))

Submission status: Accepted

Solution code:
a,*n=map(int,open(0))
print(int(sum(n[:])-max(n)/2))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

p.sort(reverse=True)
p[0] = p[0] // 2
ans = 0
for i in p:
    ans += 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())
#t, a = map(int,input().split())
lst = [int(input()) for _ in range(n)]
m = max(lst)

c = sum(lst) - m // 2

print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A = int(input())
B = [int(input()) for _ in range(A)]
p = 0
B = sorted(B)
b = B.pop(-1)
for i in B:
  p += i
print(b//2 + p)

Submission status: Accepted

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

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
N = int(input())
p = [int(input()) for _ in range(N)]
sum_ch = 0
highest = p[0]
for i in p:
    sum_ch += i
    if i > highest:
        highest = i
sum_ch = sum_ch - highest + (highest//2)
print(sum_ch)

Submission status: Accepted

Solution code:
#coding:utf-8
n = int(input())
p = [int(input()) for _ in range(n)]

p_sorted = sorted(p, reverse=True)

#全商品の合計から最高額商品の半額分だけを引く
print(sum(p_sorted) - p_sorted[0]//2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = int(input())

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

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

print(sum(p_list))

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import heapq

lst = []
for i in range(int(input())):
    lst.append(int(input()) * -1)

heapq.heapify(lst)
lst[0] //= 2
print(sum(-x for x in lst))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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