In Istanbul, you lead a group of one merchant and four assistants who run tents in the bazaar. In each such place you can perform a certain action. However, the problem is to take some action, you must move your trader, but the helper remains in place. If you want to use this assistant again, your merchant must go back to pick it up. Your goal is to collect as many rubies as possible.