K = int(input()) X = [0] * (K+10) for i in range(1, K+1): X[i] = sum([X[i-j] for j in range(1, 7)])/6 + 1 print(X[K])