During 2009, taxpayers decided to sell their residence, which had a basis of $350,000. They had owned and occupied the residence for 8 years. To make it more attractive to prospective buyers, they had it painted in April at a cost of $5,000 and paid for the work immediately. They sold the house in May for $500,000. Broker's commissions and other selling expenses amounted to $30,000. They purchased a new residence in June for $250,000. What is the realized gain?