Valera is a coder. Recently he wrote a funny program. The pseudo code for this program is given below:
    
    
      
    //input: integers x, k, p  
    a = x;  
    for(step = 1; step <= k; step = step + 1){  
        rnd = [random integer from 1 to 100];  
        if(rnd <= p)  
            a = a * 2;  
        else  
            a = a + 1;  
    }  
      
    s = 0;  
      
    while(remainder after dividing a by 2 equals 0){  
        a = a / 2;  
        s = s + 1;  
    }  
      
    

Now Valera wonders: given the values x, k and p, what is the expected value of the resulting number s?

Input

The first line of the input contains three integers x, k, p (1 ≤ x ≤ 109; 1 ≤ k ≤ 200; 0 ≤ p ≤ 100).

Output

Print the required expected value. Your answer will be considered correct if the absolute or relative error doesn't exceed 10 - 6.

Examples

Input

1 1 50


Output

1.0000000000000


Input

5 3 0


Output

3.0000000000000


Input

5 3 25


Output

1.9218750000000

Note

If the concept of expected value is new to you, you can read about it by the link: 

http://en.wikipedia.org/wiki/Expected_value
//Author: net12k44
//Fixed solution based on the idea in the Editorial
import java.io.*;
import java.util.*;
//public
class Main{//}

final int TOP = 8;
final int BASE = (1 << TOP) - 1;
final int D = 140;
double f[][][];
final double ep = 1e-6;
int x, k , p;

//len < 0: consecutive 1 outside state
//len > 0



private void update(double cur[][], double next[][],
		int len, int state, 
		int nextState, double prob, boolean mul){
	int top = (nextState & (1 << TOP)) == 0 ? 1 : -1;		
	int nextLen = len;
	if (mul){		
		if (top > 0) {
			if (nextLen < 0) nextLen = 1;
			else if (nextLen > 0) nextLen++;
		} else {
			if (nextLen < 0) nextLen--;
			else nextLen = -1;
		}
	} else if (top < 0) {
		if (nextLen < 0) nextLen = -nextLen;
		else nextLen = -1;
	}
	nextState &= BASE;
	next[nextLen + D][nextState] += cur[len+D][state] * prob;
}

double getLen(int len, int state){
	int result = 0;
	if (state == 0) {
		if (len > 0) result = TOP + len;
		else if (len!=0) result = TOP;
	} else {
		int cur = state;
		while ( (cur&1) == 0 ) {
			result++;
			cur >>= 1;
		}			
	}
	return result;
}
/*
private double dp(int step, int len, int state){ 
	if (f[step][len+D][state] >= 0) return f[step][len+D][state];
	
	if (step == k) {		
		int result = 0;
		if (state == 0) {
			if (len > 0) result = TOP + len;
			else if (len!=0) result = TOP;
		} else {
			int cur = state;
			while ( (cur&1) == 0 ) {
				result++;
				cur >>= 1;
			}			
		}		
		f[step][len+D][state] = result;
		//out.printf("%d %d %d %f\n",step,len,state,f[step][len+D][state]);
		return result;
	}
	
		
	double mulProb = (double) p / 100;
	double addProb = (double) (100-p) / 100;
	//int nextState, nextLen, top;
	f[step][len+D][state] = 0;
	update(step, len, state, state << 1, mulProb, true);
	update(step, len, state, state+1, addProb, false);	
	return f[step][len+D][state];
}
*/
private void solve() {
	x = in.nextInt(); k = in.nextInt(); p = in.nextInt();
	f = new double[2][380][1 << TOP];
	
	int len = 0;
	for(int i = TOP; (1 << i) <= x; ++i){
		int t = ( (1 << i) & x ) == 0 ? 1 : -1;
		//out.println(t);
		if (t*len < 0) break;
		len += t;
	}	
	for(double[][] ff: f)
		for(double[] fff: ff) Arrays.fill(fff, 0);
		
	f[0][len+D][x & BASE] = 1;
	int now = 0;
	double mulProb = (double)p / 100;
	double addProb = (double)(100-p)/100;
	for(int step = 0; step < k; ++step) {
		double cur[][] = f[now];
		double next[][] = f[now ^ 1];
		for(double[] tmp: next) Arrays.fill(tmp, 0);
		for(len = -135; len <= 235; ++len)
		for(int state = 0; state <= BASE; ++state)
		  if (cur[len+D][state] >= -ep){			
			update(cur, next, len, state, state<<1, mulProb, true);
			update(cur, next, len, state, state+1, addProb, false);
		}
		now ^= 1;
	}
	
	double result = 0;
	for(len = -135; len <= 235; ++len)
	for(int state = 0; state <= BASE; ++state)
		result = result + f[now][len+D][state] * getLen(len, state);
	//out.println( dp(0, len, x & BASE) );
	out.println(result);
	
}
	
public static void main (String[] args) throws java.lang.Exception {		
	long startTime = System.currentTimeMillis();

	out = new PrintWriter(System.out);
	new Main().solve();	
	//out.println((String.format("%.2f",(double)(System.currentTimeMillis()-startTime)/1000)));
	out.close();
}
static PrintWriter out;
static class in {
	static BufferedReader reader = new BufferedReader( new InputStreamReader(System.in) ) ;
	static StringTokenizer tokenizer = new StringTokenizer("");				
	static String next() {		
		while ( !tokenizer.hasMoreTokens() )
			try { tokenizer = new StringTokenizer( reader.readLine() ); }
			catch (IOException e){
				throw new RuntimeException(e);			
			}		
		return tokenizer.nextToken();
	}
	static int nextInt() { return Integer.parseInt( next() ); }			
}
//////////////////////////////////////////////////
}//