Mary has 52 dollars and she paid 6 dollars for the pie. her friend has 43 dollars . How much money did she have after buying the pie?