finding diamond riches formula xcpp