At first, Sam had 2/3 as much money as Paul. Ean had $36 more than Sam. After Paul gave $98 to Sam and some money to Ean, all three boys had the same amount of money. How much did they have altogether?