#include<iostream> int main(){ int a,b=1,i=0; scanf("%d",&a); while(b<=a){ if(a%b==0) i=i+b; b=b+1; } printf("%d",i); return 0; }