N = int(input()) def divisor(n): ans = [] for i in range(1, int(n**0.5)+1): if n % i == 0: ans.append(i) if i*i != n: ans.append(n//i) return sorted(ans) print(N-len(divisor(N)))