The sum of the gravitational potential energy and kinetic energy is called the mechanical energy.
In a closed system, one where there are no external dissipative forces acting, the mechanical energy will remain constant.
The formula of mechanical energy is M.E = K. E + P.E
M.E = ½ mv^2 + mgh
m = mass of an object
v = velocity of that object
g = acceleration due to gravity
h = height of an object.