To figure out the minimum number of rubies you’re guaranteed to win, you need to look for the worst case scenario, as if the merchant already knew your move and could arrange the rubies to minimize your winnings.