class Input_kyopro: def II(self): return int(input()) def MI(self): return map( int,input().split()) def MS(self): return map(str,input().split()) def LMI(self): return list(self.MI()) def LMS(self): return list(self.MS()) def LLI(self,N): return [self.LMI() for _ in range(N)] def LLS(self,N): return [self.LMS() for _ in range(N)] def LS(self,N): return [input() for _ in range(N)] def LSL(self,N): return [list(input()) for _ in range(N)] def LI(self,N): return [self.II() for _ in range(N)] I=Input_kyopro() #入力 def yakusuurekkyo(N): n=int(N**(1/2)) ans=set() for i in range(1,n+1): if N%i==0: ans.add(i) ans.add(N//i) ans=sorted(list(ans)) return ans N=I.II() p=yakusuurekkyo(N) print(N-len(p))