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