Why were the European allies able to defeat Napoleon in 1814 and again in 1815?

Much of Napoleon's army were untrained and not prepared for battle, plus it didn't help that his generals refused to fight.