Major U.S. stock indexes climbed for a third day.