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

Solution (in JAVA):

Solution:
import java.util.Scanner;
import java.io.OutputStream;
import java.io.IOException;
import java.io.PrintWriter;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author Dumbear (dumbear@163.com)
 */
public class Main {
	public static void main(String[] args) {
		InputStream inputStream = System.in;
		OutputStream outputStream = System.out;
		Scanner in = new Scanner(inputStream);
		PrintWriter out = new PrintWriter(outputStream);
		TaskE solver = new TaskE();
		solver.solve(1, in, out);
		out.close();
	}
}

class TaskE {
    public void solve(int testNumber, Scanner in, PrintWriter out) {
        int x = in.nextInt(), n = in.nextInt(), p = in.nextInt();
        double[][][] prob = new double[n + 32][256][2];
        if (x / 256 % 2 == 0) {
            prob[x < 256 ? 0 : Integer.numberOfTrailingZeros(x / 256)][x % 256][0] = 1.0;
        } else {
            prob[Integer.numberOfTrailingZeros(x / 256 + 1)][x % 256][1] = 1.0;
        }
        for (int i = 0; i < n; ++i) {
            double[][][] next = new double[n + 32][256][2];
            for (int high = 0; high < n + 31; ++high) {
                for (int low = 0; low < 256; ++low) {
                    double p1 = (double)p / 100.0, p2 = 1.0 - p1;
                    if (low < 128) {
                        next[high == 0 ? 0 : high + 1][low * 2 % 256][0] += prob[high][low][0] * p1;
                        next[1][low * 2 % 256][0] += prob[high][low][1] * p1;
                    } else {
                        next[1][low * 2 % 256][1] += prob[high][low][0] * p1;
                        next[high + 1][low * 2 % 256][1] += prob[high][low][1] * p1;
                    }
                    if (low < 255) {
                        next[high][(low + 1) % 256][0] += prob[high][low][0] * p2;
                        next[high][(low + 1) % 256][1] += prob[high][low][1] * p2;
                    } else {
                        next[1][0][1] += prob[high][low][0] * p2;
                        next[high][0][0] += prob[high][low][1] * p2;
                    }
                }
            }
            prob = next;
        }
        double res = 0.0;
        for (int high = 0; high < n + 32; ++high) {
            for (int low = 0; low < 256; ++low) {
                res += prob[high][low][0] * (low == 0 ? 8 + high : Integer.numberOfTrailingZeros(low));
                res += prob[high][low][1] * (low == 0 ? 8 : Integer.numberOfTrailingZeros(low));
            }
        }
        out.printf("%.16f\n", res);
    }
}