#include using namespace std; typedef long long ll; int main() { int k; cin>>k; double dp[k+6] {}; for (int i=k-1;k>=0;k--) { dp[i] = 1; for (int j=1;j<=6;j++) dp[i] += dp[i+j]/6; } cout << dp[0] << endl; return 0; }