#include using namespace std; #define int long long #define rep(i,n) for(int i=0;i<(n);i++) #define reps(i,f,n) for(int i=(f);i<(n);i++) #define pb push_back #define all(v) (v).begin(),(v).end() typedef vectorvint; typedef pairpint; typedef vectorvpint; double dp[100]; signed main(){ int K;cin>>K; for(int i=K-1;i>=0;i--){ double a=0; for(int j=1;j<=6;j++)a+=dp[i+j]/6; dp[i]=a+1; } printf("%.20lf\n",dp[0]); return 0; }