Accumulated Earnings and Profits Question

I cannot understand this concept. Here is the question I am studying: Rose Corporation, a calendar year corporation, had accumulated earnings and profits of $40,000 as of January 1, 2014. However, for the first six months of 2014 Rose Corporation had an operating loss of $36,000, and finished the year with a total net operating loss for tax year 2014 of $55,000. Rose Corporation distributed $15,000 to its shareholders on July 1, 2014. Which of the following is correct? A. The entire distribution of $15,000 is taxable as a dividend. B. The entire distribution is not taxable. C. The part of the distribution which is taxable as a dividend is $12,500. D. The part of the distribution which is taxable as a dividend is $14,000. Then answer is C. How can you distribute to shareholders if a company already has a loss? In my head, the company doesn't have any money. So where is the distrubution coming from? Is this a separate account? I'm lost.