At the beginning of the month, Lily has $4,578. By the end of the month, she only has $947 left over. How much money did she spend?