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
import java.util.Comparator;
import java.io.BufferedReader;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Collection;
import java.util.List;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.ArrayList;
import java.util.StringTokenizer;
import java.math.BigInteger;
import java.util.Collections;
import java.io.InputStream;

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

class TaskE {

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int x = in.nextInt();
        int n = in.nextInt();
        int pi = in.nextInt();
        double p = (1. * pi) / 100.;
        double[][][][] dp = new double[2][256][2][n + 32];
        ArrayUtils.fill(dp, 0);
        if (x / 256 % 2 == 0) {
            dp[0][x % 256][0][x < 256 ? 0 : Integer.numberOfTrailingZeros(x / 256)] = 1.0;
        } else {
            dp[0][x % 256][1][Integer.numberOfTrailingZeros(x / 256 + 1)] = 1.0;
        }
        for (int i = 0; i < n; ++i) {
            ArrayUtils.fill(dp[1], 0);
            for (int high = 0; high < n + 31; ++high) {
                for (int low = 0; low < 256; ++low) {
                    double notP = (1.0 - p);
                    {
                        if (low < 128) {
                            dp[1][low * 2][0][high == 0 ? 0 : high + 1] += dp[0][low][0][high] * p;
                            dp[1][low * 2][0][1] += dp[0][low][1][high] * p;
                        } else {
                            dp[1][(low * 2) % 256][1][1] += dp[0][low][0][high] * p;
                            dp[1][(low * 2) % 256][1][high + 1] += dp[0][low][1][high] * p;
                        }
                    }
                    {
                        if (low < 255) {
                            dp[1][low + 1][0][high] += dp[0][low][0][high] * notP;
                            dp[1][low + 1][1][high] += dp[0][low][1][high] * notP;
                        } else {
                            dp[1][0][1][1] += dp[0][low][0][high] * notP;
                            dp[1][0][0][high] += dp[0][low][1][high] * notP;
                        }
                    }
                }
            }
            double[][][] temp = dp[0];
            dp[0] = dp[1];
            dp[1] = temp;
        }
        double res = 0;
        for (int high = 0; high < n + 32; ++high) {
            for (int low = 0; low < 256; ++low) {
                res += dp[0][low][0][high] * (low == 0 ? 8 + high : Integer.numberOfTrailingZeros(low));
                res += dp[0][low][1][high] * (low == 0 ? 8 : Integer.numberOfTrailingZeros(low));
            }
        }
        out.printf("%.13f\n", res);
    }
}

class InputReader {
    private BufferedReader reader;
    private StringTokenizer stt;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
    }

    public String nextLine() {
        try {
            return reader.readLine().trim();
        } catch (IOException e) {
            return null;
        }
    }

    public String nextString() {
        while (stt == null || !stt.hasMoreTokens()) {
            stt = new StringTokenizer(nextLine());
        }
        return stt.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(nextString());
    }

}

class ArrayUtils {

    public static void fill(double[][][] f, double value) {
        for (int i = 0; i < f.length; ++i) {
            for (int j = 0; j < f[i].length; ++j) {
                Arrays.fill(f[i][j], value);
            }
        }
    }

    public static void fill(double[][][][] g, int value) {
        for (int i = 0; i < g.length; ++i) {
            ArrayUtils.fill(g[i], value);
        }
    }

}

