#include #include #include #include #include #include #include #include #include #include #include #include typedef long long ll; using namespace std; #define mod 1000000009 #define INF 10000000 #define LLINF 2000000000000000000LL #define SIZE 10001 int k; double E(int x){ if(k<=x) return 0; double ret=0; for(int i=1;i<=6;i++){ ret+= E(x+i); } return ret/6.0+1; } int main(){ scanf("%d",&k); printf("%.10lf\n",E(0)); return 0; }