N=int(input()) pr=set() for i in range(1,N+1): if i*i>N: break if N%i==0: pr.add(i) pr.add(N//i) print(N-len(pr))