#include #include using namespace std; static const int INF=1e9; int main(){ int N; cin >> N; vector dp(N+1); vector v(N); for(int i=0;i> v[i]; } dp[0]=v[0]; dp[1]=max(v[0],v[1]); for(int i=2;i