#include using namespace std; int K; double E(int x) { if (x >= K) return 0; return (E(x + 1) + E(x + 2) + E(x + 3) + E(x + 4) + E(x + 5) + E(x + 6)) / 6 + 1; } int main() { cin >> K; cout << E(0); }