N = int(input()) x= 10 ** N a = x y = x % 7 x -= y x /= 7 print("{0}".format(int(x / a))) if x == 0 else print("{0}".format(float(x / a)))