import time start = time.time() import random k = int(input()) cnt = 0 tot = 0 while time.time() - start < 1.8: x = 0 cnt += 1 while x != k: tot += 1 x += random.randrange(1, 7) if x > k: x = 0 print(tot / cnt)