The ambition of Hong Taiji, the first emperor of the Qing dynasty, was to use the examinations to foster a cadre of Manchu Bannermen who were both martial and literate to administer the government. He initiated the first exam for bannermen in 1638, offered in both Manchu and Chinese, even before his troops took Beijing in 1644. But the Manchu bannermen had no time or money to prepare for the exams, especially since they could gain advancement on the battlefield, and the dynasty went on to rely on both Manchu and Han Chinese officials chosen through the system inherited with minor adaptation from the Ming. During the dynasty a total of 26,747 "jinshi" degrees were earned in 112 examinations held over the 261 years 1644–1905, an average of 238.8 "jinshi" degrees conferred per examination.