6128 - 例9.21 方格取数
时间限制 : 1 秒
内存限制 : 128 MB
图像小部件



输入

输出

样例
输入
8 2 3 13 2 6 6 3 5 7 4 4 14 5 2 21 5 6 4 6 3 15 7 2 14 0 0 0
输出
67
来源
一本通