#include <bits/stdc++.h>   using namespace std;   int main() {     int n;     int s;     cin >> n;     s = n;     int k = 2;     while (k <= n) {       if (n % k == 0) {         s += n / k;         n = n / k;       } else         k++;     }     cout << s;     return 0;   }   