On the stormy deck of the pirate sloop Black Byte, Captain Crunch squints at a waterlogged map. The crew has been searching for the legendary Cache of Infinity, but the map's coordinates are encoded in a way that no ordinary pirate can read. The captain needs a coder of the Byte Bandit rank to decipher the riddle before the Royal Navy catches up. The challenge is called "Nth Fibonacci Number". The waves crash against the hull as the first mate loads the problem into the ship's ancient brass computer. Salt spray fills the air, and the crew holds its breath. On the stormy deck of the pirate sloop Black Byte, Captain Crunch squints at a waterlogged map. The crew has been searching for the legendary Cache of Infinity, but the map's coordinates are encoded in a way that no ordinary pirate can read. The captain needs a coder of the Byte Bandit rank to decipher the riddle before the Royal Navy catches up. The challenge is called "Nth Fibonacci Number". The waves crash against the hull as the first mate loads the problem into the ship's ancient brass computer. Salt spray fills the air, and the crew holds its breath. Read a non-negative integer N from standard input and print the Nth Fibonacci number (F(0)=0, F(1)=1). The edges of the map are stained with the following warnings and constraints: 0 <= N <= 50 Captain Crunch's parrot has memorized these test cases from the captain's log: Input: 2 Output: 1 The wind is shifting, and the sails are full. The Royal Navy's flags are visible on the horizon. Solve this riddle quickly, or the Cache of Infinity will be lost to the sea forever. Write code that the captain can trust with his life. The edges of the map are stained with the following warnings and constraints: 0 <= N <= 50 Captain Crunch's parrot has memorized these test cases from the captain's log: Input: 2 Output: 1 The wind is shifting, and the sails are full. The Royal Navy's flags are visible on the horizon. Solve this riddle quickly, or the Cache of Infinity will be lost to the sea forever. Write code that the captain can trust with his life. The path to mastering Nth Fibonacci Number is not one that can be walked in a single step. It demands patience, precision, and a deep respect for the boundaries that shape the problem. Many adventurers before you have attempted this trial and failed, their code crashing against the very constraints that the elders inscribed. But you have the tools. You have the training. You have reached the Byte Bandit tier, and that alone means the council believes in your potential. Look once more at the examples above. Trace the logic with your finger if you must. Consider the time and memory limits carefully, for they are not suggestions but strict laws of the arena. When you are ready, commit your solution. Let the compiler run. Let the test cases judge your work. If your code is true, the gates will open and you will move closer to the ultimate rank. If not, study the failure, sharpen your algorithm, and try again. For in the halls of CodeTikki, the only thing more important than success is the wisdom gained from the attempt. Remember that the Byte Bandit challenge is designed to test not just knowledge, but character. Every edge case is a lesson. Every time limit is a teacher. Every hidden test is a guardian at the gate. Do not rush. Let your code breathe. Let it be as clean as a mountain stream. When the final test passes, you will know that you have earned the title. Until then, code with courage, test with care, and never stop learning.
Constraints:
0 <= N <= 50
