how to calculate elongation of a spring