#include "bits/stdc++.h" using namespace std; #define print(x) cout< PI; typedef pair V; typedef vector VE; const ll mod = 1000000007; int n; int v[1002]; int dp[1002][2]; int main(){ cin>>n; REP(i,n)cin>>v[i]; dp[0][0]=0; dp[0][1]=v[0]; dp[1][0]=v[0]; dp[1][1]=v[1]; for(int i=2;i