Folded Distance by DP