#include "bits/stdc++.h" using namespace std; typedef long long ll; typedef pair pii; typedef pair pll; const int INF = 1e9; const ll LINF = 1e18; template ostream& operator << (ostream& out,const pair& o){ out << "(" << o.first << "," << o.second << ")"; return out; } template ostream& operator << (ostream& out,const vector V){ for(int i = 0; i < V.size(); i++){ out << V[i]; if(i!=V.size()-1) out << " ";} return out; } template ostream& operator << (ostream& out,const vector > Mat){ for(int i = 0; i < Mat.size(); i++) { if(i != 0) out << endl; out << Mat[i];} return out; } template ostream& operator << (ostream& out,const map mp){ out << "{ "; for(auto it = mp.begin(); it != mp.end(); it++){ out << it->first << ":" << it->second; if(mp.size()-1 != distance(mp.begin(),it)) out << ", "; } out << " }"; return out; } /* 問題文============================================================ ================================================================= 解説============================================================= ================================================================ */ typedef long double ld; ld memo[21][1<<14]; int A; ld P[3]; ld rec(int a,int tooth){ ld& ret = memo[a][tooth]; if(!(ret < 0)) return ret; ret = 0; for(int t = 0; t < (1<<14);t++){ if((tooth&t) != tooth) continue; ld Ptooth = 1; for(int b = 0; b < 14;b++){ if(!((t>>b)&1)) continue; int cnt = 2; if(b == 0){ cnt--; if(!((t>>1)&1)) cnt--; }else if(b == 13){ cnt--; if(!((t>>12)&1)) cnt--; }else{ if(!((t>>(b-1))&1)) cnt--; if(!((t>>(b+1))&1)) cnt--; } if((tooth>>b)&1) Ptooth *= (1-P[cnt]); else Ptooth *= P[cnt]; } ret += (Ptooth*rec(a-1,t)); } return ret; } ld solve(){ fill(*memo,*memo+21*(1<<14),-1); ld res = 0; cin >> A; A = 80 - A; for(int i = 0; i < 3;i++){ cin >> P[i]; P[i]/=100;} for(int t = 0; t < (1<<14);t++)memo[0][t] = 0; memo[0][(1<<14)-1] = 1; for(int t = 0; t < (1<<14);t++) rec(A,t); for(int tup = 0; tup < (1<<14);tup++){ int up = __builtin_popcount(tup); for(int tdown = 0; tdown < (1<<14);tdown++){ int down = __builtin_popcount(tdown); res += (up+down)*memo[A][tup]*memo[A][tdown]; } } return res; } int main(void) { cin.tie(0); ios_base::sync_with_stdio(false); cout << fixed << setprecision(12) << solve() << endl; return 0; }