#include #include #include #include #include #include #include #include #include #include #include #include using namespace std; using ll = long long; int main(){ ll N, ans=0; cin >> N; vector A(N); for (int i=0; i> A[i]; vector> v(1e5+1); for (int i=1; i<=1e5; i++){ for (int j=i; j<=1e5; j+=i){ v[j].push_back(i); } } vector dp(1e5+1, -1e18); dp[1] = 0; for (int i=0; i