When i is even
else : NEW_LINE INDENT dp [ i ] [ 1 ] = ( a [ i - 1 ] + max ( [ dp [ i - 2 ] [ 1 ] , dp [ i - 2 ] [ 0 ] , dp [ i - 1 ] [ 0 ] ] ) ) NEW_LINE dp [ i ] [ 0 ] = a [ i - 2 ] + dp [ i - 2 ] [ 0 ] NEW_LINE DEDENT