from functools import lru_cache def main(): K = int(input()) @lru_cache def expect_dice_sum_K(now: int) -> int: if now >= K: return 0 return sum(expect_dice_sum_K(now+next_) for next_ in range(1, 7))/6 + 1 print(expect_dice_sum_K(0)) if __name__ == "__main__": main()