#include #include #include #define f(i, s, k, l) for(int i = s; i < k; i += l) #define for0(i, k) f(i, 0, k, 1) #define pl pair #define pb push_back #define vl vector #define vi vector #define sz(x) (ll)(x).size() using namespace std; using ll = long long; using ld = float; int main() { ios_base::sync_with_stdio(false); cin.tie(nullptr); string s; cin >> s; ll n = sz(s); vector dp(n + 1, 0); dp[0] = 0; for(ll r = 1; r <= n; r++) { ld prob = 10; for(ll l = r; l > 0; l--) { dp[r] += 0.9 * prob * dp[l]; prob *= 0.1; } prob = 1; // not sure if 5 is enough for0(i, min(r, 5ll)) { dp[r] += prob * (s[i] - '0'); prob *= 0.1; } } cout << fixed << setprecision(10) << dp[n] << endl; }