Amun: Solving the last Cairo-Games challenge

For their second edition of the Cairo Games, StarkWare have proposed 5 challenges for testing your Cairo skills. Cairo is a specialized language used for writing provable programs. Its syntax is a mix of many languages (it is built on top of Python), but it has some strong limitations that we will need to work with.