According to the conservation of energy
[tex]Total\text{ energy = Potential energy +Kinetic energy}[/tex]At the top of the hill, only the potential energy will work as it is at rest.
Also, potential energy increases with height, so if the height of the first hill is the highest, the total energy will be more.