$${A = mgh_1 + mgh_2+ mgh_3 + ... = mg(h_1 + h_2 + h_3 + ...)}$$