Mr. Ng gave his two children money. His daughter received thrice as much as his son. If his daughter bought a toy for $36 and his son received another $18 from his mom, both of the children would have the same amount of money. How much did Mr. Ng give to his son in the beginning?