#include #include #include using namespace std; int main() { int N, V[1000], dp[1000]; cin >> N; for (int i=0; i> V[i]; dp[0] = V[0]; dp[1] = max(V[0], V[1]); for (int i=2; i