Village A and Village B raise the same number of sheep. Village A sells 50 sheep and Village B buys 30 sheep. Now the number of sheep in Village B is three times that of Village A. How many sheep did the two villages originally have? (improvement question)
甲乙两个村养的羊数相等，甲村卖出50只，乙村买进30只，现在乙村的羊数是甲村的3倍，两村原来各有多少？(提高题)
<gadget id="calculator">50 + 30</gadget>
<output>80</output>

<gadget id="calculator">3 - 1</gadget>
<output>2</output>

<gadget id="calculator">80 / 2</gadget>
<output>40</output>

<gadget id="calculator">40 + 50</gadget>
<output>90</output>

<result>90</result>