dynamic programming: coin sums