System.in.eachLine{n=it as int for(s=i=0;i<(d=n/++i);)s+=n%i?0:i