/*
*/
//#pragma comment(linker, "/STACK:16777216")
#define _CRT_SECURE_NO_WARNINGS
#include <fstream>
#include <iostream>
#include <string>
#include <complex>
#include <math.h>
#include <set>
#include <vector>
#include <map>
#include <queue>
#include <stdio.h>
#include <stack>
#include <algorithm>
#include <list>
#include <ctime>
#include <memory.h>
#include <assert.h>
#define y0 sdkfaslhagaklsldk
#define y1 aasdfasdfasdf
#define yn askfhwqriuperikldjk
#define j1 assdgsdgasghsf
#define tm sdfjahlfasfh
#define lr asgasgash
#define norm asdfasdgasdgsd
#define eps 1e-9
#define M_PI 3.141592653589793
#define bs 1000000007
#define bsize 350
using namespace std;
const int INF = 1e9;
const int N = 200000;
int res;
double dp[105000][180];
int main(){
//freopen("fabro.in","r",stdin);
//freopen("fabro.out","w",stdout);
//freopen("F:/in.txt", "r", stdin);
//freopen("F:/output.txt", "w", stdout);
ios_base::sync_with_stdio(0);
//cin.tie(0);
for (int i = 2; i < 20; i++)
{
if (i % 2 == 0)
res += 18;
else
res += 1;
}
cout << res << endl;
int STEPS = 100000;
dp[0][0] = 1.0;
for (int i = 0; i < STEPS; i++)
{
for (int j = 0; j < res-1; j++)
{
if (dp[i][j] < 1e-50)
continue;
if (j>0)
dp[i + 1][j - 1] += dp[i][j] / 4;
else
dp[i + 1][j] += dp[i][j] / 4;
dp[i + 1][j + 1] += dp[i][j] / 4;
dp[i + 1][j] += dp[i][j] / 2;
}
}
double res = 0;
for (int i = 0; i < 170; i++)
res += dp[STEPS][i];
cout.precision(12);
cout << fixed << res << endl;
cin.get(); cin.get();
return 0;
}
LyoKKi8KCi8vI3ByYWdtYSBjb21tZW50KGxpbmtlciwgIi9TVEFDSzoxNjc3NzIxNiIpCiNkZWZpbmUgX0NSVF9TRUNVUkVfTk9fV0FSTklOR1MKCiNpbmNsdWRlIDxmc3RyZWFtPgojaW5jbHVkZSA8aW9zdHJlYW0+CiNpbmNsdWRlIDxzdHJpbmc+CiNpbmNsdWRlIDxjb21wbGV4PgojaW5jbHVkZ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