Ali had a collection of seashells. He started with 180 seashells. He then gave away 40 seashells to his friends. He also gave 30 seashells to his brothers. If he sold half of the remaining seashells, how many seashells did he have left?
When he gave 40 seashells to his friends, Ali had 180-40= 
<gadget id="calculator">180-40</gadget>
<output>140</output>
140 seashells.
When he gave another 30 seashells to his brothers, he had 140-30 = 
<gadget id="calculator">140-30</gadget>
<output>110</output>
110 seashells.
He also sold half of the seashells, a total of 1/2*110 = 
<gadget id="calculator">55</gadget>
<output>55</output>
55 seashells.
He was left with 110-55= 
<gadget id="calculator">110-55</gadget>
<output>55</output>
55 seashells.

<result>55</result>