#include using namespace std; #define REP(i,a,b) for(int i=(a);i<(b);++i) #define rep(i,n) REP(i,0,n) #define INF (1<<30) #define INFLL (1LL<<62LL) typedef long long ll; typedef unsigned long long ull; typedef pair pii; typedef pair pll; int dx[8] = {0, 1, 0, -1, 1, -1, 1, -1}; int dy[8] = {1, 0, -1, 0, 1, -1, -1, 1}; double solve(double p, double q, int d) { if (d > 20) return 1; double pp = 0.0; // use strategy pp += p / 2.0; pp += p / 2.0 * solve(max(0.0, p - q), q, d + 1); // not use strategy pp += (1.0 - p) / 3.0; pp += (1.0 - p) / 3.0 * solve(min(1.0, p + q), q, d + 1); return pp; } int main() { ios_base::sync_with_stdio(false); cin.tie(0); double p, q; cin >> p >> q; p /= 100.0; q /= 100.0; double ans = 1.0 / 3.0 + solve(p, q, 0) / 3.0; cout << fixed << setprecision(10) << ans << endl; return 0; }