WHat happens to a pendulum's kinetic energy when it stops moving???

at the top? It has transformed to gravitaional potential energy.