How do you write the expression that represents the total length of each segment