import sys input = sys.stdin.readline N=int(input()) LIST=[] for i in range(1,10**5): if N%i==0: LIST.append(i) LIST.append(N//i) LIST=set(LIST) print(N-len(LIST))