A shepherd drove a flock of sheep across 10 rivers, and one-third of the sheep fell into the river every time they crossed a river. He caught three sheep each time, and finally found out that there were only nine sheep left. How many sheep did the flock have before crossing the river?
牧羊人赶一群羊过10条河，每过一条河时都有三分之一的羊掉人河中，每次他都捞上3只，最后清查还剩9只．这群羊在过河前共有多少只．
<gadget id="calculator">9 - 3</gadget>
<output>6</output>

<gadget id="calculator">1 / 3</gadget>
<output>1/3 = around 0.333333</output>

<gadget id="calculator">1 - (1/3)</gadget>
<output>2/3 = around 0.666667</output>

<gadget id="calculator">6 / (2/3)</gadget>
<output>9</output>

<result>9</result>