from fractions import Fraction def make_divisors(n): lower_divisors , upper_divisors = [], [] i = 1 while i*i <= n: if n % i == 0: lower_divisors.append(i) if i != n // i: upper_divisors.append(n//i) i += 1 return lower_divisors + upper_divisors[::-1] N = int(input()) yaku = make_divisors(N) A = sum(yaku) B = 0 for y in yaku: B += Fraction(1, y) ans = A/B print(ans)