A sheet of paper contains (2 \le n \le 100, is even) positive integers. Each number does not exceed . Two players are playing a game. On each move, a player can cross out either the leftmost or rightmost number. The crossed-out number is added to the player's score.
Print the maximum possible total points the first player can get, assuming the opponent also plays optimally.
The first line contains one integer (2 \le n \le 100, is even).Each of the next lines contains a positive integer not exceeding .
Print the maximum total points the first player can get if the second player plays optimally.
Example 1