Added COJ problem 2340.