Finding the height of a rectangle