Dynamic Programming - Coin Distribution