N=gets.to_i X={} 1.upto(N**0.5){|i| if N%i==0 a,b=i.to_s,(N/i).to_s X[a+b]=X[b+a]=true end } p X.size