Starting with three numbers , at each step do one of the three operations:
- change to ;
- change to ;
- change to ;
Define to be the minimum number of steps required for one number to become zero. If this is not possible then .
For example, :
However, as no series of operations leads to a zero number.
Also define .
You are given and .
Find .
Write-up coming later
The complete problem is available here. An approach, code, and answer will be added later.