A taxpayer owns 50% of the stock of an S corporation and materially participated in the corporation's activities. At the beginning of the year, the taxpayer had an adjusted basis in the stock of $25,000 and made a loan to the corporation of $13,000. During the year, $3,000 of the loan was repaid, and the taxpayer's share of the corporation's loss for the year was $40,000. What is the amount of the loss that may be deducted on the taxpayer's tax return?