Folded continued fractions