#素因数分解 def Prime_Factorization(N): if N<0: R=[[-1,1]] else: R=[] N=abs(N) k=2 while k*k<=N: if N%k==0: C=0 while N%k==0: C+=1 N//=k R.append([k,C]) k+=1 if N!=1: R.append([N,1]) if not R: R.append([N,1]) return R #約数のK乗和 def Divisor_Sigma(N,K=1): if N==1: return 1 H=Prime_Factorization(N) R=1 if K==0: for (_,e) in H: R*=(e+1) else: for (p,e) in H: R*=(p**((e+1)*K)-1)//(p**K-1) return R #================================================ N=int(input()) if N%2: A=N else: A=N//2 print(Divisor_Sigma(A))