#include #include #include #include #include #include int max( int x, int y ) { if ( x > y ) { return x; } else { return y; } } int calc( int N, int* V ) { if ( N == 0 ) { return 0; } else if ( N == 1 ) { return V[0]; } else { int ret1 = V[0] + calc( N-2, V+2 ); int ret2 = calc( N-1, V+1 ); return max( ret1, ret2 ); } } int main() { // input int N; int V[1000]; scanf( "%d", &N ); for ( int i=0; i