Aunt Li kept her chickens in the east and west courtyards respectively. It is known that there are 40 chickens in the east courtyard. Now she sells (1/4) of the chickens raised in the west courtyard to shops and (1/3) to factories. Add the remaining chickens to the chickens in the east courtyard, and the sum is exactly equal to 50% of the total number of chickens in the east and west courtyards. How many chickens were raised in the East and West courtyards?
李大娘把养的鸡分别关在东和西两个院内，已知东院养鸡40只，现在把西院养鸡的(1/4)卖给商店，(1/3)卖给工厂，再把剩下的鸡与东院的鸡相加，其和恰好等于原来东和西两院养鸡总数的50%．原来东西两院一共养鸡多少只？
<gadget id="calculator">40 - 20</gadget>
<output>20</output>

<gadget id="calculator">50 / 100</gadget>
<output>1/2 = around 0.5</output>

<gadget id="calculator">1 / 4</gadget>
<output>1/4 = around 0.25</output>

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

<gadget id="calculator">1 - (1/4) - (1/3)</gadget>
<output>5/12 = around 0.416667</output>

<gadget id="calculator">(1/2) - (5/12)</gadget>
<output>1/12 = around 0.083333</output>

<gadget id="calculator">20 / (1/12)</gadget>
<output>240</output>

<gadget id="calculator">240 + 40</gadget>
<output>280</output>

<result>280</result>