k = input() left = 0 right = 300 c = [0]*(k+1) for t in xrange(90): mid = (left + right) / 2. for x in xrange(k-1,-1,-1): c[x] = sum(mid if x+i>k else c[x+i] for i in xrange(1,7))/6.+1 if c[0]>mid: left = mid else: right = mid print left