#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){ int S = 1<<14; S--; S ^= j; for(int T = S;true;T = (T-1)&S){ double v = dp[j]; rep(k,14){ if((T>>k)&1)v *= ps[j][k]; else if(((j>>k)&1)==0) v *= 1.0 - ps[j][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<