#include using namespace std; #define int long long //#define uint __int128_t #define pb push_back #define fi first #define se second #define rep(i,s,n) for(int i = s;i=(s);i--) #define all(v) (v).begin(),(v).end() #define chmin(a,b) a=min((a),(b)) #define chmax(a,b) a=max((a),(b)) #define endl '\n' #define IOS() ios_base::sync_with_stdio(0);cin.tie(0) typedef long long ll; typedef pairpint; typedef vectorvint; typedef vector vvint; typedef vectorvpint; typedef pair P1; typedef pair P2; typedef pair PP; const ll MOD=1000000007,INF=1e18; int N; double dp[1000100][7]; signed main() { IOS(); //(1ll<>N; dp[0][0]=1; rep(i,0,N){ rep(j,0,7){ dp[i+1][j+1]+=dp[i][j]*(6-j)/6; dp[i+1][j]+=dp[i][j]*j/6; } } printf("%.18lf",dp[N][6]); return 0; }