In September 1812, now 23 years old, after becoming ill from overwork, Cauchy returned to Paris. Another reason for his return to the capital was that he was losing his interest in his engineering job, being more and more attracted to the abstract beauty of mathematics; in Paris, he would have a much better chance to find a mathematics related position. Therefore, when his health improved in 1813, Cauchy chose to not return to Cherbourg. Although he formally kept his engineering position, he was transferred from the payroll of the Ministry of the Marine to the Ministry of the Interior. The next three years Augustin-Louis was mainly on unpaid sick leave, and spent his time quite fruitfully, working on mathematics (on the related topics of symmetric functions, the symmetric group and the theory of higher-order algebraic equations). He attempted admission to the First Class of the Institut de France but failed on three different occasions between 1813 and 1815. In 1815 Napoleon was defeated at Waterloo, and the newly installed Bourbon king Louis XVIII took the restoration in hand. The Académie des Sciences was re-established in March 1816; Lazare Carnot and Gaspard Monge were removed from this Academy for political reasons, and the king appointed Cauchy to take the place of one of them. The reaction by Cauchy's peers was harsh; they considered his acceptance of membership of the Academy an outrage, and Cauchy thereby created many enemies in scientific circles.