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.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.util.Arrays;
import java.io.BufferedWriter;
import java.text.DecimalFormat;
import java.util.InputMismatchException;
import java.io.IOException;
import java.text.NumberFormat;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.InputStream;

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

    static class TaskE {
        private static final Integer LENGTH = 32;

        private int get(int value) {
            return Integer.numberOfTrailingZeros(value);
        }

        public void solve(int testNumber, InputReader in, OutputWriter out) {
            int initialValue = in.nextInt();
            int countOfSteps = in.nextInt();
            int param = in.nextInt();
            double probability = param / 100.0;
            double[][][][] dp = new double[2][256][2][countOfSteps + LENGTH];
            ArrayUtils.fill(dp, 0);
            if (initialValue / 256 % 2 == 0) {
                dp[0][initialValue % 256][0][initialValue < 256 ? 0 : get(initialValue / 256)] = 1.0;
            } else {
                dp[0][initialValue % 256][1][get(initialValue / 256 + 1)] = 1.0;
            }
            for (int step = 0; step < countOfSteps; step++) {
                ArrayUtils.fill(dp[1], 0);
                for (int first = 0; first < countOfSteps + 31; first++) {
                    for (int mask = 0; mask < 256; mask++) {
                        double notP = (1.0 - probability);
                        if (mask < 128) {
                            dp[1][mask * 2][0][first == 0 ? 0 : first + 1] += dp[0][mask][0][first] * probability;
                            dp[1][mask * 2][0][1] += dp[0][mask][1][first] * probability;
                        } else {
                            dp[1][(mask * 2) % 256][1][1] += dp[0][mask][0][first] * probability;
                            dp[1][(mask * 2) % 256][1][first + 1] += dp[0][mask][1][first] * probability;
                        }
                        if (mask < 255) {
                            dp[1][mask + 1][0][first] += dp[0][mask][0][first] * notP;
                            dp[1][mask + 1][1][first] += dp[0][mask][1][first] * notP;
                        } else {
                            dp[1][0][1][1] += dp[0][mask][0][first] * notP;
                            dp[1][0][0][first] += dp[0][mask][1][first] * notP;
                        }
                    }
                }
                double[][][] temp = dp[0];
                dp[0] = dp[1];
                dp[1] = temp;
            }
            double result = 0;
            for (int high = 0; high < countOfSteps + 32; ++high) {
                for (int low = 0; low < 256; ++low) {
                    result += dp[0][low][0][high] * (low == 0 ? 8 + high : get(low));
                    result += dp[0][low][1][high] * (low == 0 ? 8 : get(low));
                }
            }
            DecimalFormat format = new DecimalFormat("#.0000000000000");
            out.print(format.format(result));
        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0) {
                    writer.print(' ');
                }
                writer.print(objects[i]);
            }
        }

        public void close() {
            writer.close();
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;
        private InputReader.SpaceCharFilter filter;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1) {
                throw new InputMismatchException();
            }
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0) {
                    return -1;
                }
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c)) {
                c = read();
            }
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9') {
                    throw new InputMismatchException();
                }
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        public boolean isSpaceChar(int c) {
            if (filter != null) {
                return filter.isSpaceChar(c);
            }
            return isWhitespace(c);
        }

        public static boolean isWhitespace(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

        public interface SpaceCharFilter {
            public boolean isSpaceChar(int ch);

        }

    }

    static class ArrayUtils {
        public static void fill(double[][] array, double value) {
            for (double[] row : array) {
                Arrays.fill(row, value);
            }
        }

        public static void fill(double[][][] array, double value) {
            for (double[][] row : array) {
                fill(row, value);
            }
        }

        public static void fill(double[][][][] array, double value) {
            for (double[][][] row : array) {
                fill(row, value);
            }
        }

    }
}