SP22337 BOBERT - Stick values

Description

On a sunny day, Stjepan and Bobert were arguing over their problem solving skill under a big apple tree. Bobert brought up a nice problem he had just recently solved and claimed that Stjepan could not solve it. Stjepan is desperate and needs your help. Here is Bobert's problem: Given an array of **N** (1

Input Format

9

Output Format

The only line should contain the solution - the maximum sum of stick values as explained in the task.