PROGRAMMING:Tower of Hanoi III
At the end of the 19th century, a kind of intellectual toy was sold in shops in Europe. On a copper plate, there were three poles. On the leftmost pole, from top to bottom, from small to large, a tower composed of 64 disks was strung in sequence. The purpose is to move all the disks on the leftmost stick to the right stick, provided that only one disk can be moved at a time, and the large disk is not allowed to be placed on the top of the small disk.
Now we change the way the game is played. It is not allowed to move directly from the leftmost (right) side to the rightmost (left) side (every time you move, you must move to the middle bar or move out from the middle), and it is not allowed to put the big plate on the lower plate.
Daisy has done the original tower of Hanoi problem and tower of Hanoi II, but when she came across this problem, she thought for a long time and couldn't solve it. Now please help her. Now there are n disks. How many times can she move these disks from the leftmost to the rightmost?
###Input format:
Contains multiple sets of data, each time enter a n value (1 < = n = 35).
###Output format:
For each group of data, the output moves the minimum number of times.
###Input example:
Here is a set of inputs. For example:
```in
one
three
twelve
```
###Output example:
The corresponding output is given here. For example:
```out
two
twenty-six
five hundred and thirty-one thousand four hundred and forty
```
answer:If there is no answer, please comment
Now we change the way the game is played. It is not allowed to move directly from the leftmost (right) side to the rightmost (left) side (every time you move, you must move to the middle bar or move out from the middle), and it is not allowed to put the big plate on the lower plate.
Daisy has done the original tower of Hanoi problem and tower of Hanoi II, but when she came across this problem, she thought for a long time and couldn't solve it. Now please help her. Now there are n disks. How many times can she move these disks from the leftmost to the rightmost?
###Input format:
Contains multiple sets of data, each time enter a n value (1 < = n = 35).
###Output format:
For each group of data, the output moves the minimum number of times.
###Input example:
Here is a set of inputs. For example:
```in
one
three
twelve
```
###Output example:
The corresponding output is given here. For example:
```out
two
twenty-six
five hundred and thirty-one thousand four hundred and forty
```
answer:If there is no answer, please comment