#include #include #include using namespace std; int n,i,j,k; long long f[100100][17],res; int main() { scanf("%d",&n); for (i=0; i=0) f[i][j]=max(f[i][j],f[k][j-1]); } for (i=1; i