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 Mangos {
	public static void mergeS(double[] a,int s,int e) {
		if(s!=e) {
			int mid = (s+e)/2;
			mergeS(a,s,mid);
			mergeS(a,mid+1,e);
			merge(a,s,mid,mid+1,e);
		}
		
	}
	public static void merge(double[] a ,int s1,int e1,int s2,int e2) {
		double[] r = new double[e2-s1+1];
		int t = s1;
		for (int i = 0; i < r.length; i++) {
			if(s1>e1) {
				for (int j = s2; j <= e2; j++) {
					r[i]=a[j];
					i++;
				}
				break;
			}
			if(s2>e2) {
				for (int j = s1; j <= e1; j++) {
					r[i]=a[j];
					i++;
				}
				break;
			}
			if(a[s1]>a[s2]) {
				r[i]=a[s1];
				s1++;
			}
			else {
				r[i]=a[s2];
				s2++;
			}
		}
		for (int i = 0; i < r.length; i++) {
				a[t+i]=r[i];
			
		}
	}
public static void main(String[] args) throws IOException{
 
	Scanner sc = new Scanner(System.in);
	PrintWriter pw = new PrintWriter(System.out);
	int n = (int)sc.nextDouble();
	double k = sc.nextDouble();
	k = k/100.0;
	double[] x = new double[n];
	double h = 0;
	boolean f = true;
	for (int i = 0; i < n; i++) {
		x[i]=sc.nextDouble();
		if(i==0) {
			h = x[i];
		}
		else {
			if(x[i]!=h) {
				f = false;
			}
		}
	}
	if(f) {
		pw.println(x[0]);
	}
	else {
	mergeS(x,0,x.length-1);
	double end = x[0];
	double start = x[n-1];
	double r = 0.0;
	double z  = Math.pow(10.0,-8.0);
	while(end - start>z) {
		double mid = (start+end)/2.0;
		double mid2 = mid-z;
		double[] v = x.clone(); 
		double sum1 = 0;
		double sum2 = 0;
		for (int i = 0; i < x.length; i++) {
			if(v[i]>=mid2) {
				sum1+=(v[i]-mid);
			}
			else {
				sum2+=(mid-v[i]);
			}
		}
		sum1 = sum1*(1-k);
		sum1 = sum1-sum1%z;
		sum2=sum2-sum2%z;
		
		double kofta = Math.abs(sum1-sum2);
		kofta = kofta -kofta%z;
		if(kofta<=Math.pow(10, -6)) {
			start = mid+z ;
		}
		else {
			if(sum1<sum2) {
				end = mid-z;
			}
			else {
				start = mid+z;
			}
		}
		if(end - start>z) {
			r = mid;
		}
		
	}
	pw.print(r);
	}
	pw.flush();
}
}
 
class Scanner 
{
    StringTokenizer st;
    BufferedReader br;
 
    public Scanner(InputStream s){    br = new BufferedReader(new InputStreamReader(s));}
 
    public String next() throws IOException 
    {
        while (st == null || !st.hasMoreTokens()) 
            st = new StringTokenizer(br.readLine());
        return st.nextToken();
    }
 
    public int nextInt() throws IOException {return Integer.parseInt(next());}
    
    public long nextLong() throws IOException {return Long.parseLong(next());}
 
    public String nextLine() throws IOException {return br.readLine();}
    
    public double nextDouble() throws IOException
    {
        String x = next();
        StringBuilder sb = new StringBuilder("0");
        double res = 0, f = 1;
        boolean dec = false, neg = false;
        int start = 0;
        if(x.charAt(0) == '-')
        {
            neg = true;
            start++;
        }
        for(int i = start; i < x.length(); i++)
            if(x.charAt(i) == '.')
            {
                res = Long.parseLong(sb.toString());
                sb = new StringBuilder("0");
                dec = true;
            }
            else
            {
                sb.append(x.charAt(i));
                if(dec)
                    f *= 10;
            }
        res += Long.parseLong(sb.toString()) / f;
        return res * (neg?-1:1);
    }
    
    public boolean ready() throws IOException {return br.ready();}
 
 
}