PROGRAMMING:Optimal triangulation of convex polygon
Given an n-sided convex polygon P, it is necessary to determine the triangulation of the convex polygon (divide the polygon into n-2 triangles) so that the sum of the weights of the triangles in the triangulation is the minimum. The weight of each side chord is given by the input data and expressed in the form of undirected graph. The weight of a triangle is equal to the sum of the weights of the three sides.
![ Figure 1. JPG] (~ / bc9c1a23-5bf5-47fe-941d-5323707e1de8. JPG)
###Input format:
In the first line, enter the number of sides of the convex polygon n (3 < = n < = 8)
From the second line, enter the weight of the edge or string from vertex i (1 < = I < = n) to vertex J (I < = J < = n)
###Output format:
The sum of the weights of the triangles in the optimal triangulation.
###Input example:
```in
six
0 2 2 3 1 4
0 1 5 2 3
0 2 1 4
0 6 2
0 1
0
```
###Output example:
```out
twenty-four
```

answer:If there is no answer, please comment
![ Figure 1. JPG] (~ / bc9c1a23-5bf5-47fe-941d-5323707e1de8. JPG)
###Input format:
In the first line, enter the number of sides of the convex polygon n (3 < = n < = 8)
From the second line, enter the weight of the edge or string from vertex i (1 < = I < = n) to vertex J (I < = J < = n)
###Output format:
The sum of the weights of the triangles in the optimal triangulation.
###Input example:
```in
six
0 2 2 3 1 4
0 1 5 2 3
0 2 1 4
0 6 2
0 1
0
```
###Output example:
```out
twenty-four
```

answer:If there is no answer, please comment