k=int(input()) a=[0]*(k+7) for i in range(k-1,-1,-1): for j in range(6): a[i] += a[j+i] / 6 a[i] += 1 print(a[0])