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.

Solution (Python):



def main():
    N = input()
    p = [input() for _ in xrange(N)]
    print(max(p) / 2 + sum(p) - max(p))


if __name__ == "__main__":
    main()

Solution (Python):
N, = map(int, raw_input().split())
p = [0]*N
for i in range(N):
  p[i], = map(int, raw_input().split())
print sum(p)-max(p)//2

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

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

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

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

Solution (Python):



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

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

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


if __name__ == "__main__":
    main()

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

Solution (Python):
def solve(N, Ps):
    return sum(Ps) - (max(Ps) // 2)

if __name__ == "__main__":
    N = int(input())
    Ps = [int(input()) for _ in range(N)]
    print(solve(N, Ps))

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

ans = int((max(p) / 2) - max(p))
for i in p:
    ans += i
print(ans)

Solution (Python):
n = int(input())
maxp = 0
res = 0
for i in range(n):
    inp = int(input())
    res += inp
    if inp > maxp:
        maxp = inp

res -= maxp / 2
print(int(res))

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

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

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

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

ma = max(p)
su = sum(p)
print(su - ma + ma // 2)

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

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

L.sort()

res = 0
res += sum(L)
res -= L[-1]/2

print(int(res))

Solution (Python):
N = int(input())
ps = sorted([int(input()) for _ in range(N)])

total = int(sum(ps) - ps[-1] / 2)

print(total)

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

Solution (Python):
N = int(input())
p = [int(input()) for _ in range(N)]
maxn = max(p)

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

Solution (Python):
a = int(input())
c = []

for i in range(a):
	c.append(int(input()))

k = max(c)

print(sum(c)-max(c)+(k//2))

Solution (Python):
n = int(input())

a_list = []

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


a_list.sort()

b_list = a_list[:-1]
print(a_list[-1]//2 + sum(b_list))

Solution (Python):
N=int(input())
p=[int(input()) for _ in range(N)]
pa=sorted(p)
s=sum(pa)-int(0.5*pa[-1])
print(s)

Solution (Python):
def main():
    N = int(input())
    p = [int(input()) for _ in range(N)]

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


if __name__ == '__main__':
    main()

Solution (Python):
n = int(input())
array = sorted([int(input()) for x in range(n)])
print(sum(array[:-1])+array[-1]//2)

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

Solution (Python):



 
import sys
import math



 

fileoperation=0
if(fileoperation):
    orig_stdout = sys.stdout
    orig_stdin = sys.stdin
    inputfile = open('W:/Competitive Programming/input.txt', 'r')
    outputfile = open('W:/Competitive Programming/output.txt', 'w')
    sys.stdin = inputfile
    sys.stdout = outputfile


mod=1000000007
 

def nospace(l):
    ans=''.join(str(i) for i in l)
    return ans
 
 
 

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

if(fileoperation):
    sys.stdout = orig_stdout
    sys.stdin = orig_stdin
    inputfile.close()
    outputfile.close()

Solution (Python):

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

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

Solution (Python):
n = int(input())

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

m = max(p)

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

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

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

Solution (Python):
N=int(input())
max_=0
ans=0
for i in range(N):
    p=int(input())
    ans+=p
    if max_<p:
        max_=p
ans-=max_//2
print(ans)

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

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

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

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

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

Solution (Python):
N = int(input())
prices = []

sum = 0
for i in range(N) :
	p = int(input())
	prices.append(p)
	sum += p

max_p = max(prices)
sum -= max_p
sum += int(max_p/2)

print(sum)

Solution (Python):


import sys
from collections import Counter


input = sys.stdin.readline
INF = float('inf')
MOD = 10 ** 9 + 7


def inpl(): return list(map(int, input().split()))


N = int(input())

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

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

print(sum(P))

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

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

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

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

Solution (Python):
n=int(input())
l=[]
for i in range(n):
  l.append(int(input()))
l.sort()
l.reverse()
s=0
for i in range(n):
  if i==0:
    s+=l[i]//2
  else:
    s+=l[i]
print(s)

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

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

max_num = max(num_list)
print(str(sum(num_list) - int(max_num/2 + 0.1)))

Solution (Python):
n = int(input())
m = None
s = 0
for i in range(n):
    w = int(input())
    s += w
    if i == 0:
        m = w
    elif m < w:
        m = w
print(int(s - m/2))

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

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

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

Solution (Python):

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

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

P = sorted(P)

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

Solution (Python):

def inpl(): return list(map(int, input().split()))
N = int(input())

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

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

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

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

Solution (Python):
def getN():
    return int(input())

def getMN():
    a = input().split()
    b = [int(i) for i in a]
    return b[0],b[1]

def getlist():
    a = input().split()
    b = [int(i) for i in a]
    return b

n = getN()

price = []
for i in range(n):
    price.append(getN())

wari = max(price) // 2
print(sum(price) - wari)

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

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

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

ans = 0
p.sort(reverse=True)

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

print(ans)

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

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

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

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

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

Solution (Python):
n = int(input())
p = []
m = 0
Max = 0
for i in range(n):
    t = int(input())
    if t > Max:
        Max = t
        m = i
    p.append(t)
p[m] //= 2
print(sum(p))

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

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

Solution (Python):
n = input()
l = []
for i in xrange(n):
	l.append(input())
l.sort()
print sum(l) - l[-1]/2

Solution (Python):

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

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

Solution (Python):
n = int(input())

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

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

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

Solution (Python):
n = int(input())

tmp = 0
t_max = 0
for _ in range(n):
    a = int(input())
    tmp += a
    t_max = max(t_max, a)

print(tmp - t_max // 2)

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

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

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

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

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

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

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

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

Solution (Python):



import array
from bisect import *
from collections import *
import fractions
import heapq 
from itertools import *
import math
import random
import re
import string
import sys

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