n = int(input()) if n == 0: print(0) else: q, r = divmod(n, 6) print('0.' + '142857' * q + '142857'[:r])