n=int(input()) l=[] for i in range(1,n+1): if n%i==0: l.append(i) l2=[] for x in l: l2.append(1/x) print(int(sum(l)/sum(l2)))