By Deyao Chen
You are designing an open world game. In the game, a character can climb a ladder to move up. In each move, the character can either climb up one unit by pressing the up arrow, or leap up moves by pressing x. Note that if there is less than units left of the ladder, the player can still choose to leap.
Now you want the game to drop a loot whenever the player does a specific combination of moves and leaps (Think of this as a sort of hidden cheat code or hidden combo). Obviously, the higher the ladder, the more unlikely the player will randomly stumble across the specific combination. So you decide to count the number of combinations of moves given the height of a ladder to gauge the difficulty of achieving the hidden combo.
.
.
.
.
No more constraints.
Input one number, , the height of the ladder.
Output one number, , the remainder of the number of combinations of moves divided by .
5
9
The ladder is units high, the number of combinations of moves is :