#include #include #include #include #include #include using namespace std; typedef pair PP; int P, Q; double bfs() { queue que; que.push(make_pair(1./3,P)); double ans = 1. / 3; int cnt = 0; while (cnt!=1000000) { pair p = que.front(); que.pop(); ans += p.first / 2 * p.second/100; ans += p.first / 3 * (100-p.second)/100; if(p.second+Q<100) que.push(make_pair(p.first / 3 * (100 - p.second) / 100,p.second + Q)); else if(p.second!=100) que.push(make_pair(p.first / 3 * (100 - p.second) / 100, 100)); if(p.second-Q>0)que.push(make_pair(p.first / 2 * p.second / 100,p.second - Q)); else if(p.second!=0) que.push(make_pair(p.first / 2 * p.second / 100, 0)); cnt++; } return ans; } int main() { cin >> P >> Q; cout <