U.S. economy grew in third quarter despite surging inflation