Zhengling has found that Tianyi bury some evidence that she had eaten. So Zhengling decides to give her some lessons.
But Tianyi is so afraid that she couldn't help run away.
Of course, Zhengling will hunt her down.
The area is a square N * M. Tianyi will run away from the left-bottom corner to the upper-side. Then will she run from the upper-side to the bottom-side. Last she will run from the bottom-side to the right-upper corner.
Can you tell Tianyi that the minimum distance she will run?
2 1 1 1 1 2 0 0
4 3 6
无
XadillaX