Source: http://mathematiques.ac-bordeaux.fr/pedaclg/sujets/bblanc/miramont/2011/SujetentierBB2011+corr.pdf