it's gravitational potential energy at the top will roughly equal it's kinetic energy when it was released (a little is lost to air resistance). Note this will assume the release point is zero potential energy. (we are free to define it that way, just letting you know). Gravitational potential energy is mgh.
mgh=25J
h=25J/(0.5kg x 9.81m/s^2) = 5.097m
So it goes about 5.1 meters above the point where it was released