Divide a unit segment into 3 congruent segments and remove the middle segment. Do this process a second time on each of the remaining two segments. If this process is carried out a total of n times, what is the sum of the lengths of the remaining segments?