import math import decimal decimal.getcontext().prec = 100000 def no746(a): b = decimal.Decimal(0) b = math.floor(a / 7) print(decimal.Decimal(b/a)) if __name__ == "__main__": a = decimal.Decimal(input()) no746(10**a)