Hanoi Towers - Reloaded
In one of the temples in the Indian city of Benares, there is a bronze plaque with three diamond rods. At the creation of the world, the supreme Hindu god Brahma placed 64 pure gold disks on the first rod, arranged in decreasing order of size. He instructed the monks to move these disks to the third rod, with the rules that only one disk can be moved at a time and a larger disk cannot be placed on a smaller one. Since then, the monks have been working on this task day and night, taking turns. Once they complete this task, the temple will crumble to dust, and Brahma's life will end. A new Brahma will then be born, and the cycle will begin anew.
Before you start believing that the monks of the Hindu monastery are actually solving this puzzle, let me clarify that this is merely a legend. It is not an ancient one, like many well-known legends. It was created in the late 19th century by the French mathematician Édouard Lucas. This captivating story served as a successful promotional tool for Lucas's charming puzzle, made of wood and consisting of eight disks. Starting from 1883, it was marketed under various names such as "Towers of Brahma," "End of the World Puzzle," and "Pagoda Puzzle." The setting of the legend was moved several times, from China to Tibet, and finally settled in Vietnam, along with the name "Towers of Hanoi."
When will the life of the next new Brahma end, considering that he will surely learn from his predecessor's experience and the monks will undoubtedly have more disks?
Input
A single number - the number of disks n (64 ≤ n ≤ 10000), given to the monks by the next Brahma.
Output
A single number - the minimum number of moves required for the monks to transfer the tower from the 1-st rod to the 3-rd in the optimal manner.