#include using namespace std; long process(long b){ if (b == 1) return 1; long total = 1; long i=1; long base = 1; while (base * i <= b){ long newBase = base * i; if (b%newBase== 0 && b != newBase){ total += b/newBase; base = newBase; i = 1; } i++; } return total; } long longestSequence(vector a) { long total = 0; for (int i=0; i> n; vector a(n); for(int a_i = 0; a_i < n; a_i++){ cin >> a[a_i]; } long result = longestSequence(a); cout << result << endl; return 0; }