It is well known that the planet suffers from the energy crisis. Little Petya doesn't like that and wants to save the world. For this purpose he needs every accumulator to contain the same amount of energy. Initially every accumulator has some amount of energy: the i-th accumulator has ai units of energy. Energy can be transferred from one accumulator to the other. Every time x units of energy are transferred (x is not necessarily an integer) k percent of it is lost. That is, if x units were transferred from one accumulator to the other, amount of energy in the first one decreased by x units and in other increased by <image> units.

Your task is to help Petya find what maximum equal amount of energy can be stored in each accumulator after the transfers.

Input

First line of the input contains two integers n and k (1 ≤ n ≤ 10000, 0 ≤ k ≤ 99) — number of accumulators and the percent of energy that is lost during transfers.

Next line contains n integers a1, a2, ... , an — amounts of energy in the first, second, .., n-th accumulator respectively (0 ≤ ai ≤ 1000, 1 ≤ i ≤ n).

Output

Output maximum possible amount of energy that can remain in each of accumulators after the transfers of energy.

The absolute or relative error in the answer should not exceed 10 - 6.

Examples

Input

3 50
4 2 1


Output

2.000000000


Input

2 90
1 11


Output

1.909090909

Source: codeforces | Difficulty: MEDIUM_HARD
Tags: Sorting


Solutions:
def check(a, k, cur):
	need = 0
	have = 0
	for x in a:
		if x < cur:
			need += cur - x
		else:
			have += (x - cur) * (1 - k / 100)
	return need <= have
(n, k) = [int(x) for x in input().split()]
a = [int(x) for x in input().split()]
l = 0
r = 1000
for i in range(100):
	cur = (l + r) / 2
	if check(a, k, cur):
		l = cur
	else:
		r = cur
print((l + r) / 2)


TOL = 10 ** (-9)
(n, k) = map(int, input().split())
arr = list(map(int, input().split()))
arr = sorted(arr)
lef = arr[0]
rit = arr[n - 1]
while rit - lef > TOL:
	mid = (lef + rit) / 2
	pls = 0
	mns = 0
	for i in range(n):
		if arr[i] > mid:
			pls += arr[i] - mid
		else:
			mns += mid - arr[i]
	gt = pls * (1 - k / 100) - mns > 0
	if gt:
		lef = mid
	else:
		rit = mid
print('%.9f' % lef)


(n, k) = map(float, input().split())
lst = list(map(float, input().split()))
n = int(n)
lst.sort()
lst.reverse()

def cout(x):
	(a, b) = (0, 0)
	for (i, x) in enumerate(lst):
		if x > mid:
			x -= mid
			a += x * (100.0 - k) / 100.0
		elif x < mid:
			b += mid - x
	return (a, b)
(l, r) = (lst[n - 1], lst[0])
while l + 1e-09 < r:
	mid = (l + r) / 2
	(q, w) = cout(mid)
	if q <= w:
		r = mid
	else:
		l = mid
print(r)


def check(x):
	a = 0
	b = 0
	up = 0
	dn = 0
	for i in e:
		if i < x:
			b += 1
			dn += i
		elif i > x:
			a += 1
			up += i
	left = (up - a * x) * (100 - k) / 100.0
	right = x * b - dn
	if abs(left - right) <= 10 ** (-7):
		return 1
	elif left > right:
		return 2
	else:
		return 3
(n, k) = list(map(int, input().split()))
e = list(map(int, input().split()))
st = 0
ed = 1000
test = 0
while st <= ed:
	x = (st + ed) / 2
	checker = check(x)
	if checker == 1:
		test = 1
		print(x)
		break
	elif checker == 2:
		st = x + 1e-07
	elif checker == 3:
		ed = x - 1e-07
if test == 0:
	print(x)


(n, k) = map(int, input().split())
energy = list(map(int, input().split()))
energy.sort()

def match(x):
	(left, right) = (0, 0)
	for i in range(n):
		if energy[i] < x:
			left += x - energy[i]
		else:
			right += energy[i] - x
	return right - right * k / 100 >= left
left = 0
right = 1000
while right - left > 1e-06:
	mid = (left + right) / 2
	if match(mid):
		left = mid
	else:
		right = mid
print(left)


(n, k) = map(int, input().split())
a = sorted(list(map(int, input().split())))
left = 0
right = a[-1]
for i in range(100):
	mid = (left + right) / 2.0
	s1 = sum([x - mid for x in a if x >= mid]) * (100 - k) / 100.0
	s2 = sum([mid - x for x in a if x < mid])
	if s1 >= s2:
		left = mid
	else:
		right = mid
print(left)


import os
import sys
from math import *
from collections import *
from fractions import *
from bisect import *
from heapq import *
from io import BytesIO, IOBase

def vsInput():
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def value():
	return tuple(map(int, input().split()))

def array():
	return [int(i) for i in input().split()]

def Int():
	return int(input())

def Str():
	return input()

def arrayS():
	return [i for i in input().split()]

def possible(power):
	need = 0
	have = 0
	for i in energy:
		if i < power:
			need += power - i
		elif i > power:
			have += (i - power) * (100 - k) / 100
	return need - have < 1e-09
(n, k) = value()
energy = array()
low = min(energy)
high = max(energy)
ans = energy[0]
while low + 1e-09 < high:
	mid = low + (high - low) / 2
	if possible(mid):
		ans = mid
		low = mid
	else:
		high = mid
print(ans)


import sys
from itertools import *
from math import *

def solve():
	(n, k) = map(int, input().split())
	(ss, ll) = (0, 1000)
	a = list(map(int, input().split()))
	for i in range(100):
		avg = (ss + ll) / 2
		overamount = sum((max(0, x - avg) for x in a))
		underamount = sum((max(0, avg - x) for x in a))
		if overamount * (100 - k) >= underamount * 100:
			ss = avg
		else:
			ll = avg
	print(ss)
if sys.hexversion == 50594544:
	sys.stdin = open('test.txt')
solve()


(n, k) = map(int, input().split())
A = list(map(int, input().split()))

def f(x):
	over = 0
	need = 0
	for a in A:
		if a > x:
			over += a - x
		else:
			need += x - a
	return need <= over * (1 - k / 100)
left = 0
right = 1000
while right - left > 1e-12:
	m = (left + right) / 2
	if f(m):
		left = m
	else:
		right = m
print(right)


def check_possibility(_accumulators, max_value, n, k):
	less = 0
	more = 0
	for i in range(n):
		if _accumulators[i] > max_value:
			more += _accumulators[i] - max_value
		else:
			less += max_value - _accumulators[i]
	return more - k * more / 100 >= less

def solution():
	(n, k) = map(int, input().strip().split())
	accumulators = list(map(int, input().strip().split()))
	lo = 0
	hi = 1000
	for i in range(100):
		mid = (lo + hi) / 2
		if check_possibility(accumulators, mid, n, k):
			lo = mid
		else:
			hi = mid
	print('{0:.9f}'.format(lo))
solution()


def energy(acc, level, perc_loss):
	surplus = sum([max(x - level, 0) for x in acc])
	en_cost = sum([abs(min(0, x - level)) * 100 / (100 - perc_loss) for x in acc])
	return surplus >= en_cost

class CodeforcesTask68BSolution:

	def __init__(self):
		self.result = ''
		self.n_k = []
		self.accumulators = []

	def read_input(self):
		self.n_k = [int(x) for x in input().split(' ')]
		self.accumulators = [int(x) for x in input().split(' ')]

	def process_task(self):
		l = 0
		r = sum(self.accumulators) / self.n_k[0]
		while r - l >= 1e-07:
			mid = l + (r - l) / 2
			if energy(self.accumulators, mid, self.n_k[1]):
				l = mid
			else:
				r = mid
		self.result = str(r)

	def get_result(self):
		return self.result
Solution = CodeforcesTask68BSolution()
Solution.read_input()
Solution.process_task()
print(Solution.get_result())


(n, k) = map(int, input().split())
a = list(map(int, input().split()))
sumEn = sum(a)
left = 0
right = 1000
eps = 1e-07
while right - left > eps:
	mid = (left + right) / 2
	sumLoss = 0
	for i in a:
		if i > mid:
			sumLoss += i - mid
	sumLoss = sumLoss * (k / 100)
	if mid * n < sumEn - sumLoss:
		left = mid
	else:
		right = mid
print('%.7f' % left)


def calSumTransfer(m):
	global a
	sum_transfer = 0
	for i in range(n):
		sum_transfer += max(a[i] - m, 0)
	return sum_transfer
(n, k) = map(int, input().split())
a = list(map(int, input().split()))
left = min(a)
right = max(a)
sum_energy = sum(a)
mid = left
while right - left > 10 ** (-6):
	mid = (left + right) / 2
	sum_lost = calSumTransfer(mid) * k / 100
	if mid * n < sum_energy - sum_lost:
		left = mid
	else:
		right = mid
print('%.9f' % mid)


import bisect

def find(n, ar, left):
	right = len(ar) - 1
	while left <= right:
		mid = (left + right) // 2
		if ar[mid] == n:
			return mid
		elif n < ar[mid]:
			right = mid - 1
		else:
			left = mid + 1
	return -1
(n, k) = map(int, input().split())
k = 1.0 - k / 100
ar = [int(i) for i in input().split()]
left = min(ar)
right = max(ar)
ans = right
while right - left > 10 ** (-6):
	mid = (left + right) / 2
	need = excess = 0
	for i in ar:
		if i > mid:
			excess += (i - mid) * k
		else:
			need += mid - i
	if need >= excess:
		right = mid
		ans = mid
	else:
		left = mid
print('%.9f' % ans)


(n, k) = map(int, input().split())
lis = sorted(map(int, input().split()))
l = 0
r = 1000
su = sum(lis)
while abs(r - l) >= 1e-07:
	mid = (r + l) / 2
	trans = 0
	for i in lis:
		if i > mid:
			trans += i - mid
	if mid * n < su - trans * k / 100:
		l = mid
	else:
		r = mid
print(r)


(n, k) = map(int, input().split())
A = list(map(int, input().split()))

def f(x):
	over = 0
	need = 0
	for a in A:
		if a > x:
			over += a - x
		else:
			need += x - a
	return need <= over * (1 - k / 100)
left = 0
right = max(A)
while right - left > 1e-07:
	m = (left + right) / 2
	if f(m):
		left = m
	else:
		right = m
rounded = round(right, 8)
if int(rounded) == rounded:
	rounded = int(rounded)
print(rounded)


def energy(n, k, arr):
	arr = sorted(arr)
	max_energy = -1
	left = min(arr)
	right = max(arr)
	while abs(left - right) > 10 ** (-6):
		X = (left + right) / 2
		a = sum(arr)
		thua = 0
		for i in arr:
			if i > X:
				thua += (i - X) * k / 100
		if a - thua == n * X:
			max_energy = X
		elif a - thua - n * X > 0:
			left = X
		else:
			right = X
	print(left)
(n, k) = list(map(int, input().strip().split(' ')))
arr = list(map(int, input().strip().split(' ')))
energy(n, k, arr)


nk = list(input().split())
(n, k) = (int(nk[0]), float(nk[1]))
energy = list(map(float, input().split()))
avg = sum(energy) / len(energy)
while 1:
	sum_lf = 0
	sum_rg = 0
	cnt_lf = 0
	cnt_rg = 0
	lf = []
	flag = False
	for i in range(n):
		if energy[i] < avg:
			cnt_lf += 1
			sum_lf += energy[i]
			lf.append(energy[i])
		else:
			cnt_rg += 1
			sum_rg += energy[i]
	x = (cnt_lf * sum_rg - cnt_rg * sum_lf) / (cnt_rg * (100 - k) / 100 + cnt_lf)
	avg = (sum_rg - x) / cnt_rg
	for i in range(len(lf)):
		if lf[i] > avg:
			flag = True
	if not flag:
		break
print('%.9f' % avg)


(n, k) = [int(n) for n in input().split()]
accums = [int(n) for n in input().split()]
k = 100 - k
right = max(accums)
left = min(accums)
guess = 0
if len(accums) == 1:
	print(accums[0])
elif right == left:
	print(left)
else:
	while right - left > 1e-08:
		guess = (left + right) / 2.0
		excess = 0
		residual = 0
		for i in accums:
			if i > guess:
				excess += (i - guess) * k / 100.0
			elif i < guess:
				residual += guess - i
		if excess > residual:
			left = guess
		elif residual > excess:
			right = guess
		else:
			break
	print(guess)


(n, k) = map(int, input().split())
l = list(map(int, input().split()))
l.sort(reverse=True)
s = sum(l)
s1 = 0
s2 = s
ans = 0
k = 100 - k
for i in range(n - 1):
	s1 += l[i]
	s2 -= l[i]
	a = (s1 * k + 100 * s2) / ((i + 1) * k + 100 * (n - i - 1))
	if a <= l[i] and a >= l[i + 1]:
		ans = max(ans, a)
if len(set(l)) == 1:
	print(l[0])
else:
	print(ans)


(n, k) = map(int, input().split())
energy = sorted(list(map(int, input().split())))
factor = (100 - k) / 100
low = 0
high = sum(energy) / n
while high - low > 1e-06:
	mid = (low + high) / 2
	balance = 0
	for x in energy:
		if x > mid:
			balance -= factor * (x - mid)
		else:
			balance += mid - x
	if balance < 0:
		low = mid
	else:
		high = mid
print(high)


from bisect import bisect_left
((n, k), arr) = (map(int, input().split()), list(map(int, input().split())))
arr.sort()
(left, right, s) = (arr[0], arr[-1], sum(arr))
while right - left > 1e-08:
	(mid, loss) = ((left + right) / 2, 0)
	for i in range(bisect_left(arr, mid), n):
		loss += arr[i] - mid
	if mid * n < s - loss * k / 100:
		left = mid
	else:
		right = mid
print(left)


((n, k), t) = (map(int, input().split()), [0] + sorted(list(map(int, input().split()))))
(i, d, s) = (1, t[1], sum(t))
while i < n:
	i += 1
	d += t[i]
	if 100 * (s - t[i] * n) < k * (s - d - t[i] * (n - i)):
		d -= t[i]
		i -= 1
		break
print(t[i] + (100 * (s - t[i] * n) - k * (s - d - t[i] * (n - i))) / (100 * n - k * (n - i)))


EPS = 10 ** (-10)
(n, k) = map(int, input().split())
rate = 100 / (100 - k) - 1
a = list(map(int, input().split()))
total = 0
for x in a:
	total += x
lo = 0.0
hi = 1000.0
while abs(hi - lo) > EPS:
	mi = (hi + lo) / 2
	need = mi * n
	for i in range(n):
		if a[i] < mi:
			need += (mi - a[i]) * rate
	if need > total:
		hi = mi
	else:
		lo = mi
print('{:.9f}'.format(lo))


def ok(value):
	(low, up) = (0, 0)
	for i in range(n):
		if a[i] < value:
			low += value - a[i]
		else:
			up += a[i] - value
	return up - up * k / 100.0 >= low
(n, k) = list(map(int, input().split()))
a = list(map(int, input().split()))
s = sum(a)
(low, high) = (0, 1000.0)
for i in range(100):
	mid = (low + high) / 2
	if ok(mid):
		low = mid
	else:
		high = mid
print('%.9lf\n' % low)


def check(a, e, k):
	need = 0.0
	have = 0.0
	for x in a:
		if x > e:
			have += x - e
		else:
			need += e - x
	if have - have * k / 100 >= need:
		return True
	else:
		return False

def bs(a, k):
	low = 0.0
	hight = 1000.0
	res = 0.0
	while abs(low - hight) >= 1e-09:
		mid = (low + hight) / 2
		if check(a, mid, k):
			res = mid
			low = mid
		else:
			hight = mid
	return res
(n, k) = map(int, input().split())
a = list(map(int, input().split()))
print('%.6f' % bs(a, k))


def main():
	(n, k) = map(int, input().split())
	k = 1.0 - k / 100
	a = list(map(int, input().split()))
	ans = 0
	(l, r) = (0, 1000)
	for rep in range(100):
		mid = (l + r) / 2
		(need, excess) = (0, 0)
		for energy in a:
			if energy > mid:
				excess += (energy - mid) * k
			else:
				need += mid - energy
		if excess >= need:
			ans = mid
			l = mid
		else:
			r = mid
	print(ans)
main()


a = []

def check(valueToBeChecked):
	extraPower = 0
	for i in a:
		if i >= valueToBeChecked:
			powerDonated = i - valueToBeChecked
			extraPower += powerDonated - powerDonated * k / 100
		else:
			extraPower -= valueToBeChecked - i
	return extraPower >= 0
(n, k) = map(int, input().split(' '))
a = list(map(int, input().split(' ')))
l = 0
h = max(a)
diff = 1e-08
while l + diff <= h:
	mid = (l + h) / 2
	if check(mid):
		l = mid
	else:
		h = mid
print('{0:.10f}'.format(mid))


(n, k) = map(int, input().split())
a = list(map(int, input().split()))
(left, right) = (0.0, 1000.0)
while right - left > 1e-07:
	mid = (right + left) / 2
	transfer = 0
	for i in range(n):
		if a[i] > mid:
			transfer += (a[i] - mid) * (1 - k / 100)
		else:
			transfer += a[i] - mid
	if transfer >= 0:
		left = mid
	else:
		right = mid
print('%.9lf' % left)


(n, k) = map(int, input().split(' '))
a = list(map(int, input().split(' ')))

def check(x):
	pw = 0
	for i in a:
		if i >= x:
			rem = i - x
			pw += rem - rem * k / 100
		else:
			pw -= x - i
	if pw >= 0:
		return True
	return False
l = 0
h = max(a)
ans = 0
while l + 1e-07 <= h:
	mid = (l + h) / 2
	if check(mid):
		ans = mid
		l = mid
	else:
		h = mid
print(ans)


(n, k) = map(int, input().split())
a = list(map(int, input().split()))
sum_energy = sum(a)
left = 0
right = 1000
while right - left > 1e-07:
	mid = (left + right) / 2
	sum_transfer = 0
	for x in a:
		if x > mid:
			sum_transfer += x - mid
	if mid * n < sum_energy - sum_transfer * k / 100:
		left = mid
	else:
		right = mid
print('%.9f' % left)


(n, k) = map(int, input().split())
a = list(map(int, input().split()))
s = sum(a)
eps = 1e-10
rem = (100 - k) / 100
left = min(a)
right = max(a)
guess = left
while right - left > eps:
	guess = left + (right - left) / 2
	transferred = 0.0
	missing = 0.0
	for ai in a:
		if ai - guess > 0:
			transferred += rem * (ai - guess)
		else:
			missing += guess - ai
	if missing < transferred:
		left = guess
	else:
		right = guess
print(guess)


u = input
(n, k) = map(int, u().split())
k = 100 - k
M = [int(i) for i in u().split()]
M.sort()
sl = 0.0
sr = sum(M)
x = M[0]
if M[0] != M[len(M) - 1]:
	for j in range(n - 1):
		sl += M[j]
		sr -= M[j]
		if sl >= sr:
			break
		t = (sl + k * sr / 100.0) / (j + 1.0 + k * (n - 1 - j) / 100.0)
		f = 1
		if M[j] > t:
			f = 0
		elif j + 1 < n and M[j + 1] < t:
			f = 0
		if f:
			x = max(x, t)
print(x)


def isPossibleWithAmount(arr, e, k):
	total = 0
	for number in arr:
		if number > e:
			total += number - e
		else:
			x = (e - number) * 100 / (100 - k)
			total -= x
	return total >= 0
(n, k) = map(int, input().split())
arr = list(map(int, input().split()))
left = min(arr)
right = max(arr)
while abs(left - right) > 10 ** (-7):
	mid = (right + left) / 2
	test = isPossibleWithAmount(arr, mid, k)
	if test == True:
		left = mid
	else:
		right = mid
print(left)


import sys
input = sys.stdin.readline
rInt = lambda : int(input())
mInt = lambda : map(int, input().split())
rList = lambda : list(map(int, input().split()))
(m, k) = mInt()
a = rList()
lo = 0
hi = 1000
for _ in range(100):
	test = (lo + hi) / 2
	bar = 0
	for v in a:
		if v > test:
			bar += (100 - k) * (v - test)
		else:
			bar += 100 * (v - test)
	if bar > 0:
		lo = test
	else:
		hi = test
print(test)


(n, k) = [int(d) for d in input().split()]
a = [int(d) for d in input().split()]

def test(v):
	ia = [d for d in a if d > v]
	ea = [d for d in a if d < v]
	dis = sum(ia) - v * len(ia)
	dem = v * len(ea) - sum(ea)
	pas = dis * (1 - k / 100)
	if dem <= pas:
		return True
	return False

def bs(l, r, cnt):
	c = (l + r) / 2
	if cnt >= 60:
		return c
	elif test(c):
		return bs(c, r, cnt + 1)
	else:
		return bs(l, c, cnt + 1)
res = bs(0, 1001, 0)
print(res)


def isEnough(x):
	receiving = 0
	giving = 0
	for acc in accumulators:
		if acc < x:
			receiving += x - acc
		else:
			giving += (acc - x) * (100 - k) / 100
	return receiving <= giving

def BinarySreach(l, r):
	left = l
	right = r
	ans = r
	while left <= right:
		mid = (left + right) / 2
		if isEnough(mid):
			ans = mid
			left = mid + 10 ** (-10)
		else:
			right = mid - 10 ** (-10)
	return ans
(n, k) = map(int, input().split())
accumulators = list(map(int, input().split()))
print('{:.9f}'.format(BinarySreach(0, max(accumulators))))


((n, k), t) = (map(int, input().split()), sorted(map(int, input().split())))
(i, d, s) = (1, t[0], sum(t))
while i < n and 100 * s - k * (s - d) > t[i] * (100 * n - k * (n - i)):
	d += t[i]
	i += 1
print((100 * s - k * (s - d)) / (100 * n - k * (n - i)))


def check(a, m, k):
	sum_transfer = 0.0
	sum_need = 0.0
	for x in a:
		if x > m:
			sum_transfer += x - m
		else:
			sum_need += m - x
	if sum_transfer - sum_transfer * (k / 100.0) < sum_need:
		return False
	return True

def bs(a, k):
	l = 0
	r = 1000
	for i in range(100):
		mid = (l + r) / 2.0
		if check(a, mid, k) == False:
			r = mid
		else:
			l = mid
	return mid
(n, k) = map(int, input().split())
a = list(map(int, input().split()))
res = bs(a, k)
print('%.9f' % res)


import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(n, k) = map(int, input().split())
arr = list(map(int, input().split()))
l = min(arr)
r = max(arr)
d = 1e-09
while r - l > d:
	m = (l + r) / 2
	power = 0
	for i in range(n):
		if arr[i] > m:
			power += (arr[i] - m) * ((100 - k) / 100)
		else:
			var = m - arr[i]
			power -= var
	if power >= 0:
		l = m
	else:
		r = m
print('%.10f' % l)


(n, k) = list(map(int, input().split()))
arr = list(map(int, input().split()))

def bins():
	l = 0
	r = 10000000000000
	for i in range(100):
		mid = (l + r) / 2
		if f(mid):
			l = mid
		else:
			r = mid
	print(l)

def f(s):
	sent = 0
	sentR = 0
	for i in range(n):
		if arr[i] < s:
			sentR += (s - arr[i]) * 100 / (100 - k)
		elif arr[i] > s:
			sent += arr[i] - s
	return sent >= sentR
bins()


def check(bound):
	(more, less) = (0, 0)
	for x in a:
		if x > bound:
			more += x - bound
		else:
			less += bound - x
	return more * (100 - k) / 100 - less >= 0
(n, k) = map(int, input().split())
a = [int(x) for x in input().split()]
(res, l, r) = (0, 0, 1000)
if max(a) == min(a):
	res = a[0]
for loops in range(200):
	m = (l + r) / 2
	if check(m):
		res = m
		l = m
	else:
		r = m
print(f'{res:.8f}')


(n, k) = list(map(int, input().split(' ')))
inp = list(map(int, input().split(' ')))
(x, y) = [1, 3]
_sum = sum(inp)
right = _sum / n
left = 0
mid = (right + left) / 2
while right - left > 1e-11:
	lost = 0
	get = 0
	for i in inp:
		if mid < i:
			lost += (i - mid) * (1 - k / 100)
		else:
			get += mid - i
	if lost > get:
		left = mid
	else:
		right = mid
	mid = (right + left) / 2
print(left)


(n, k) = map(int, input().split())
a = list(map(int, input().split()))
sum_energy = sum(a)
l = 0
r = sum_energy
while r - l > 1e-07:
	mid = (l + r) / 2
	ans = 0
	for i in range(n):
		if a[i] > mid:
			ans += (100 - k) / 100 * (a[i] - mid)
		else:
			ans -= mid - a[i]
	if ans >= 0:
		l = mid
	else:
		r = mid
print('%.9f' % l)


(n, k) = map(int, input().split())
accumulators = list(map(int, input().split()))
low = 0
high = 1000
for i in range(100):
	less = 0
	more = 0
	mid = low + (high - low) / 2
	for i in range(n):
		if accumulators[i] > mid:
			more += accumulators[i] - mid
		else:
			less += mid - accumulators[i]
	if more - k * more / 100 >= less:
		low = mid
	else:
		high = mid
print('{0:.9f}'.format(low))


nk = list(map(int, input('').split()))
(n, k) = nk
aList = list(map(int, input('').split()))
aList.sort()

def isPossible(val, aList, k):
	rightSum = 0
	leftSum = 0
	for item in aList:
		if item > val:
			rightSum += item - val
		else:
			leftSum += val - item
	return rightSum - rightSum * k / 100.0 >= leftSum
left = aList[0]
right = aList[-1]
while right - left > 10 ** (-6):
	mid = (left + right) / 2
	if isPossible(mid, aList, k):
		left = mid
	else:
		right = mid
print('%.9f' % left)


def get_sum_transfer(accumulators_energy, middle):
	sum_transfer = 0
	for accumulator_energy in accumulators_energy:
		if accumulator_energy > middle:
			sum_transfer += accumulator_energy - middle
	return sum_transfer

def solve():
	(accumulators_count, percent_energy_lost) = map(int, input().split())
	accumulators_energy = list(map(int, input().split()))
	sum_energy = sum(accumulators_energy)
	left = min(accumulators_energy)
	right = max(accumulators_energy)
	while right - left > 1e-07:
		middle = (left + right) / 2
		sum_transfer = get_sum_transfer(accumulators_energy, middle)
		sum_lost = sum_transfer * percent_energy_lost / 100
		if middle * accumulators_count < sum_energy - sum_lost:
			left = middle
		else:
			right = middle
	print('{:.9f}'.format(left))
solve()


(n, k) = map(int, input().split())
a = [int(x) for x in input().split()]
l = 0
r = 1001
while r - l > 1e-07:
	m = (r + l) / 2
	plus = 0
	minus = 0
	for i in range(n):
		if a[i] <= m:
			plus += m - a[i]
		else:
			minus += a[i] - m
	minus = minus * (100 - k) / 100
	if minus >= plus:
		l = m
	else:
		r = m
print(l)


s = input().strip().split()
n = int(s[0])
k = 100 - int(s[1])
a = list()
for i in input().strip().split():
	a.append(int(i))
left = min(a)
right = max(a)
guess = max(a)
while right - left > 10 ** (-6):
	guess = (left + right) / 2
	needed = 0
	excess = 0
	for i in a:
		if i > guess:
			excess += (i - guess) * (k / 100.0)
		else:
			needed += guess - i
	if excess > needed:
		left = guess
	elif needed > excess:
		right = guess
	else:
		break
print(guess)