Problem: 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

Solution (in JAVA):

Solution:
import java.util.*;
import java.io.*;
public class Main {

	static int[][]board = new int[8][8];
	static int max = 0;
	static ArrayList<int[]> res = new ArrayList<int[]>();
	static int[]arr = new int[5];
	static boolean[] used = new boolean[5];
	static boolean found = false;
	
	public static void B(int[]arr, int i , int res , boolean first)
	{
		if(found) return;
		
		if(i == 5)
			found |= (res == 23);
			
		
		for(int j = 0 ; j < 5 ; j++)
		{
			if(used[j])
				continue;
			
			used[j] = true;
			
			if(first)
				B(arr,i+1,arr[j],false);
				
			else
			{
				B(arr, i+1, res + arr[j], false);
				B(arr, i+1, res - arr[j], false);
				B(arr, i+1, res * arr[j], false);
			}
			used[j] = false;	
		}
	}
	
	public static boolean valid(int col , int row1 , int[]row)
	{
		for(int i = 0 ; i < row1 ; i++)
		{
			if(row[i] == col || Math.abs(i - row1) == Math.abs(row[i] - col))
				return false;
		}
		return true;
	}
	
	public static void queen(int rows , int[]row)
	{
		if(rows == 8)
		{
			res.add(row);
			return;
		}
			
			
		
		for(int i = 0 ; i < 8 ; i++)
		{
			if(valid(i, rows , row))
			{
				int[]newArr = row.clone();
				newArr[rows] = i;
				queen(rows + 1 , newArr);
			}
			
			
		}
		
		
	
	}
	
	public static boolean isPrime(int x)
	{
		if(x == 2 || x == 3 || x == 5 || x == 7 || x == 11 || x == 13 || x == 17 || x == 19 || x == 23 || x == 29 || x == 31)
			return true;
		return false;
	}
	
	public static void monkey() throws Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		@SuppressWarnings("unused")
		int size = Integer.parseInt(br.readLine());
		StringTokenizer st = new StringTokenizer(br.readLine());
		int j = 0;
		TreeSet<Integer> tree = new TreeSet<Integer>();
		while(st.hasMoreTokens())
			tree.add(Integer.parseInt(st.nextToken()));
		int[]ladies = new int[tree.size()];
		while(!tree.isEmpty())
			ladies[j++] = tree.pollFirst();
		@SuppressWarnings("unused")
		int q = Integer.parseInt(br.readLine());
		st = new StringTokenizer(br.readLine());
		while(st.hasMoreTokens())
		{
			int question = Integer.parseInt(st.nextToken());
			int lo = 0 , hi = ladies.length;
			while(lo <= hi)
			{
				int mid = (lo + hi)/2;
				if(ladies[mid] == question)
				{
					if(mid-1 >= 0)
						pw.print(ladies[mid-1] + " ");
					else
						pw.print("X ");
					
					if(mid+1 < ladies.length)
						pw.println(ladies[mid+1]);
					else
						pw.println("X");
					break;
				}
				else
				{
					if(ladies[mid] < question)
					{
						if(mid+1 < ladies.length)
						{
							if(ladies[mid+1] > question)
							{
								pw.println(ladies[mid] + " " + ladies[mid+1]);
								break;
							}
							else
							{
								lo = mid;
								continue;
							}
						}
						else
						{
							pw.println(ladies[mid] + " X");
							break;
						}
					}
					if(ladies[mid] > question)
					{
						if(mid-1 >= 0)
						{
							if(ladies[mid-1] < question)
							{
								pw.println(ladies[mid-1] + " " + ladies[mid]);
								break;
							}
							else
							{
								hi = mid;
								continue;
							}
						}
						else
						{
							pw.println("X " + ladies[mid]);
							break;
						}
					}
				}
			}
		}
		pw.flush();
	}

	public static void marbles() throws Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		PrintWriter pw = new PrintWriter(System.out);
		int cases = 1;
		Thread.sleep(2000);
		while(br.ready())
		{
			//System.out.println("h");
			String s = br.readLine();
			if(s.equals("0 0"))
			{
				pw.flush();
				return;
			}
			
			StringTokenizer st = new StringTokenizer(s);
			int size = Integer.parseInt(st.nextToken());
			int questions = Integer.parseInt(st.nextToken());
			ArrayList<Integer> arr = new ArrayList<Integer>();
			for(int i = 0 ; i < size ; i++)
				arr.add(Integer.parseInt(br.readLine()));
			Collections.sort(arr);
			pw.println("CASE# " + cases++ + ":");
			
			int q ;
			for(int i = 0 ; i < questions ; i++)
			{
				q = Integer.parseInt(br.readLine());
				int res = -1;
				int lo = 0 , hi = arr.size()-1;
				while(lo <= hi)
				{
					int mid = (lo + hi)/2;
					if(mid == lo)
					{
						if(arr.get(mid) == q)
							res = mid;
						else if(mid+1 < arr.size() && arr.get(mid+1) == q)
							res = mid+1;
						break;
					}
					if(arr.get(mid) == q)
					{
						res = mid;
						while(mid-1 >= 0 && arr.get(mid-1) == q)
						{
							res = mid-1;
							mid--;
						}
						break;
					}
					else
					{
						if(arr.get(mid) > q)
							hi = mid;
						else
							lo = mid;
					}
				}
				if(res == -1)
					pw.println(q + " not found");
				else
					pw.println(q + " found at " + (res+1));
			}
		}	
	}

	public static int VK(int v, int k)
	{
		int res = v;
		int power = 1;
		while(v/Math.pow(k, power) != 0)
		{
			res += v/Math.pow(k, power);
			power++;
		}
		return res;
	}
	
	public static void oil() throws Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int res = Integer.parseInt(st.nextToken());
		int k = Integer.parseInt(st.nextToken());
		int lo = 0 , hi = (int)10e8 , answer = 0;
		while(lo <= hi)
		{
			int mid = (lo + hi)/2 ;
			if(mid == lo)
			{
				int tmp = VK(mid, k);
				if(tmp < res)
				{
					System.out.println(mid+1);
					return;			
				}
				else
				{
					System.out.println(mid);
					return;
				}
			}
			int tmp = VK(mid, k);
			if(tmp < res)
			{
				lo = mid;
			}
			else if(tmp > res)
			{
				if(tmp < answer)
					answer = mid;
				hi = mid;
			}
			else
			{
				answer = mid;
				break;
			}
		}
		System.out.println(answer);
	}

	public static void shop() throws Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int size = Integer.parseInt(st.nextToken()) ; long budget = Long.parseLong(st.nextToken());
		long[]items = new long[size];
		st = new StringTokenizer(br.readLine());
		for(int i = 0 ; i < size ; i++)
			items[i] = Integer.parseInt(st.nextToken());
		ArrayList<Long> arr = new ArrayList<>();
		ArrayList<Long> sum = new ArrayList<>();
		
		
		
		int lo = 0 , hi = size - 1 ; long mid = (lo + hi)/2;
		long trackBudget = -1;
		long res1 = 0, res2 = 0;
		while(lo <= hi)
		{
			mid = (lo + hi)/2;
			for(int  i = 0 ; i < size ; i++)
			{
				long l = (items[i]+((i+1)*(mid+1)));
				arr.add(l);
			}
			Collections.sort(arr);
			sum.add(arr.get(0));
			for(int i = 1 ; i <= mid ; i++)
				sum.add(arr.get(i) + sum.get(i-1));
			
			trackBudget = sum.get((int)mid);
			if(trackBudget > budget)
				hi = (int)mid;
			else if (trackBudget < budget)
			{
				lo = (int)mid;
				res2 = trackBudget;
				res1 = mid+1;
			}
			else
			{
				System.out.println((mid+1) + " " + trackBudget);
				return;
			}
			if(lo == mid) lo++;
			
			arr.clear();
			sum.clear();
		}
		System.out.println(res1 + " " + res2);
	}
	
	public static boolean maxCapacity(long x, long index, long[]arr, int blocks)
	{
		int sum = 0;
		int container = 1;
		for(long i = index+1 ; i < arr.length ; i++)
		{
			if(arr[(int)i] > x) return false;
			if(sum + arr[(int)i] <= x)
				sum += arr[(int)i];
			else
			{
				sum = 0;
				container++;
			}	
		}
		//System.out.println(blocks + " " + container);
		return(blocks-1 == container);
		
	}
	
	public static void energyExchange() throws Exception
	{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		StringTokenizer st = new StringTokenizer(br.readLine());
		int n = Integer.parseInt(st.nextToken());
		double k = Integer.parseInt(st.nextToken());
		ArrayList<Double> arr = new ArrayList<>();
		st = new StringTokenizer(br.readLine());
		for(int i = 0 ; i < n ; i++)
			arr.add(Double.parseDouble(st.nextToken()));
		Collections.sort(arr);
		//System.out.println(arr);
		double lo = arr.get(0), hi = arr.get(arr.size()-1); double mid = (lo + hi)/2;
		while(lo <= hi)
		{
			
			//Thread.sleep(1000);
			mid = (lo + hi)/2;
			//System.out.println(lo + " " + " " + hi + " " + mid);
			double res = 0;
			for(int i = 0 ; i < n ; i++)
			{
				if(arr.get(i) < mid)
				{
					res += mid - arr.get(i);
				}
				else if(arr.get(i) > mid)
				{
				
					res -= (arr.get(i) - mid)*((100-k)/100);
				}
			}
		//	System.out.println("res is " + res);
			if(res == 0)
			{
				System.out.println(mid);
				return;
			}
			else if(res > 0)
				hi = mid;
			else 
				lo = mid;
			 
			double newMid = (lo + hi)/2;
			if(mid == newMid)
			{
				System.out.println(lo);
				return;
			}
			
		}
		
		
		
		
		
		
		
	}
	
	public static void main(String[] args) throws Exception {
		
		energyExchange();
	}
}