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