Build towers on a game board is very interesting. Here we introduce one kind of game which is also building towers on the game board.
There are $n$ sticks on the game board. At the beginning of the game, we put plates of different colors on the sticks. There are $n-2$ different colors of plates. For each color, there are plates of size $0 , 1 , 2 , 3 , 4 , 5 , 6$ . One for each size. So totally there are $7(n-2)$ plates put on the sticks.
If a plate of size $x$ is put right above the plate of size $x+1$ of the same color, they are glued together and not able to be split any more. In other words, they must be moved together in the rest of the game.
For each move, we can only move the top plate of each stick, maybe it's glued with several other plates, so they will be moved together. We can only move them onto a stick that the top plate is in the same color with the moving one and is larger than the moving plates. Or we can move them onto an empty stick.
The goal of this game is to make $n-2$ towers on any of the $n-2$ different sticks. Each of them are made of $7$ plates in the order of $0 , 1 , 2 , 3 , 4 , 5 , 6$ from top to bottom.
Now you need to find the minimal number of moved to achieve this.