#include using namespace std; long findset(long i){ long temp=0,maxbreaks=0; if(i==3){ return 4; } else if(i==2){ return 3; } else if(i==1){ return 1; } else if(i==0){ return 0; } else{ for (long j = 1; j<=i/2; j++){ if (i % j == 0){ temp=findset(j)*(i/j); maxbreaks=(maxbreaks>temp)?maxbreaks:temp; } } return (1+maxbreaks); } } long longestSequence(vector a) { int count=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; }