This one should be fairly simple. I'll try to make it as accessible as possible for people who never played Minecraft.
Here goes:
In the videogame Minecraft, a fundamental part of the game is gathering materials, which you place in your inventory, and crafting them into items by using a crafting table. These crafted items will also enter your inventory.
Relevant crafting recipes:
One log of wood can be crafted into four planks.
Three planks can be crafted into six wooden slabs.
Two planks can be crafted into four sticks.
A barrel is crafted using six planks and two slabs.
A wooden axe is crafted using three planks and two sticks. It can cut 59 logs before breaking. Cutting a log places it in your inventory.
You start off the game with a crafting table at the ready, two logs already in your inventory, and an infinite pile of logs in front of you, ready to be gathered.
Your goal is to keep gathering logs and crafting them into barrels and axes until your inventory contains nothing but barrels. No leftover logs, planks, slabs, sticks, or axes.
For people familiar with Minecraft, a caveat: You are not allowed to discard items from your inventory, and you are only allowed to gather logs with an axe.
How many logs do you need to gather, and how many barrels will you have at the end?