A screenshot of running the program with the input $5$:
Entering the code of the program into the compiler, and running it with the input 5. Miriam Briskman, CC BY-NC 4.0.