#include using namespace std; using Int = long long; template inline void chmin(T1 &a,T2 b){if(a>b) a=b;} template inline void chmax(T1 &a,T2 b){if(a>n; using D = long double; D p,q; cin>>p>>q; const D EPS = 1e-10; using T = tuple; queue que; que.emplace(1,1,1.0); D ans=0; while(!que.empty()){ Int v,d;D x; tie(v,d,x)=que.front();que.pop(); if(x