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