#include #define REP(i,n) for(int i = 0; i < (int)(n); ++i) using namespace std; int main() { int N, t; vector V; cin >> N; REP(i,N){ cin >> t; V.push_back(t); } int dp[N+1]; dp[0] = V[0]; dp[1] = max(V[0],V[1]); for(int i=2;i