Brandy purchased the horse for $270 and immediately started paying for his keep. She sold horse for $540. Considering cost of his keep, she discovered that she had lost the amount equal to 1/2 of what she paid for horse plus 1/4 of cost of the keep. How much Brandy lost on horse?