#include #include using namespace std; #define rep(i,n) for (int i = 0; i < (n); ++i) #define Inf 1000000001 int main(){ int A; cin>>A; vector p(3); rep(i,3){ cin>>p[i]; p[i] /= 100.0; } vector ps(1<<14,vector(14)); rep(i,1<<14){ rep(j,14){ int c = 0; if(j!=0){ if(((i>>(j-1))&1)==0)c++; } if(j!=13){ if(((i>>(j+1))&1)==0)c++; } ps[i][j] = p[c]; } } vector dp(1<<14,0.0); dp[0] = 1.0; rep(i,80-A){ vector ndp(1<<14,0.0); rep(j,1<<14){ if(dp[j]<1e-16)continue; int S = 1<<14; S--; S ^= j; vector t; rep(k,14){ if((S>>k)&1)t.push_back(k); } for(int T = S;true;T = (T-1)&S){ double v = dp[j]; rep(k,t.size()){ if((T>>t[k])&1)v *= ps[j][t[k]]; else v *= 1.0 - ps[j][t[k]]; } ndp[j|T] += v; if(T==0)break; } } swap(dp,ndp); } double ans = 0.0; rep(i,1<<14){ ans += (14-__builtin_popcount(i)) * dp[i]; } ans *= 2.0; cout<