still slow :(
DP needs that the ways for smaller amount are calculated first.
logic for recursion.