While at the lycée Bergson won a prize for his scientific work and another, in 1877 when he was eighteen, for the solution of a mathematical problem. His solution was published the following year in "Nouvelles Annales de Mathématiques." It was his first published work. After some hesitation as to whether his career should lie in the sphere of the sciences or that of the humanities, he decided in favour of the latter, to the dismay of his teachers. When he was nineteen, he entered the École Normale Supérieure. During this period, he read Herbert Spencer. He obtained there the degree of "licence ès lettres", and this was followed by that of "agrégation de philosophie" in 1881 from the University of Paris.