WWOJ

1072: 铺设道路

Time Limit:  1 Sec    Memory Limit:   128 MB
Submission:14     AC:11     Score:100.00


Description

Input

Output

Samples

input:
6 4 3 2 5 3 5
output:
9

Hint

Source