from fractions import Fraction num =int(input()) lst =[] llst =[] def inverse(f): return Fraction(f.denominator,f.numerator) for y in range(num): if num % int(y+1) ==0: lst.append(y+1) y =Fraction(y,1) llst.append(inverse(y+1)) s = sum(lst) su =sum(llst) print(s/su)