#include <bits/stdc++.h> using namespace std; const double pi = 2 * acos(0.0); const double eps = 1e-8; #define REP(i,a,b) for(int i=(a); i<(b);++i) #define rep(i,n) REP(i,0,n) #define INF (1<<29) #define INFLL (1L<<29) typedef long long ll; typedef unsigned long long ull; typedef pair<int, int> pii; typedef pair<ll, ll> pll; typedef int Cost; struct Edge { int src, dst; Cost cost; Edge(int s, int d, Cost c) : src(s), dst(d), cost(c) {} }; typedef vector<Edge> Edges; typedef vector<Edges> Graph; typedef vector<Cost> Array; typedef vector<Array> Matrix; int dx[8] = {0, 1, 0, -1, 1, -1, 1, -1}; int dy[8] = {1, 0, -1, 0, 1, -1, -1, 1}; double p, q; double solve(double p, int depth) { if (depth > 20) return 1; double _p = 0; _p += p / 2; _p += p / 2 * solve(max(0.0, p - q), depth + 1); _p += (1.0 - p) / 3; _p += (1.0 - p) / 3 * solve(min(1.0, p + q), depth + 1); return _p; } int main(void) { ios_base::sync_with_stdio(false); cin.tie(0); cin >> p >> q; p /= 100.0; q /= 100.0; cout << fixed << setprecision(10) << (1.0 + solve(p, 0)) / 3.0 << endl; return 0; }