{"status": "success", "data": {"description_md": "The cards in a stack of $2n$ cards are numbered consecutively from $1$ through $2n$ from top to bottom. The top $n$ cards are removed, kept in order, and form pile $A$. The remaining cards form pile $B$. The cards are then restacked by taking cards alternately from the tops of pile $B$ and $A$, respectively. In this process, card number $(n+1)$ becomes the bottom card of the new stack, card number $1$ is on top of this card, and so on, until piles $A$ and $B$ are exhausted. If, after the restacking process, at least one card from each pile occupies the same position that it occupied in the original stack, the stack is named magical. Find the number of cards in the magical stack in which card number $131$ retains its original position.\n___\nLeading zeroes must be inputted, so if your answer is `34`, then input `034`. Full credit goes to [MAA](https://maa.org/) for authoring these problems. These problems were taken on the [AOPS](https://artofproblemsolving.com/) website.", "description_html": "<p>The cards in a stack of <span class=\"katex--inline\">2n</span> cards are numbered consecutively from <span class=\"katex--inline\">1</span> through <span class=\"katex--inline\">2n</span> from top to bottom. The top <span class=\"katex--inline\">n</span> cards are removed, kept in order, and form pile <span class=\"katex--inline\">A</span>. The remaining cards form pile <span class=\"katex--inline\">B</span>. The cards are then restacked by taking cards alternately from the tops of pile <span class=\"katex--inline\">B</span> and <span class=\"katex--inline\">A</span>, respectively. In this process, card number <span class=\"katex--inline\">(n+1)</span> becomes the bottom card of the new stack, card number <span class=\"katex--inline\">1</span> is on top of this card, and so on, until piles <span class=\"katex--inline\">A</span> and <span class=\"katex--inline\">B</span> are exhausted. If, after the restacking process, at least one card from each pile occupies the same position that it occupied in the original stack, the stack is named magical. Find the number of cards in the magical stack in which card number <span class=\"katex--inline\">131</span> retains its original position.</p>&#10;<hr><p>Leading zeroes must be inputted, so if your answer is <code>34</code>, then input <code>034</code>. Full credit goes to <a href=\"https://maa.org/\">MAA</a> for authoring these problems. These problems were taken on the <a href=\"https://artofproblemsolving.com/\">AOPS</a> website.</p>", "hints_md": "", "hints_html": "", "editorial_md": "", "editorial_html": "", "flag_hint": "", "point_value": 4, "problem_name": "2005 AIME II Problem 6", "can_next": true, "can_prev": true, "nxt": "/problem/05_aime_II_p07", "prev": "/problem/05_aime_II_p05"}}