[CODE ONLY] PYTHON DP
Code
# Code
```python3 []
class Solution:
    def maximumAmount(self, coins: List[List[int]]) -> int:
        n = len(coins)
        m = len(coins[0])

        end = (n - 1, m - 1)

        best_subs = [
            [
                [] for _ in range(m) 
            ] for _ in range(n)
        ]

        first_value = coins[0][0]

        first_option = [
            (0, 0), 
            (0, 1), 
            (first_value, 2 )
            ]

        best_subs[0][0] = first_option

        for i in range(n):
            for j in range(m):
                if i == 0 and j == 0:
                    continue

                prev_row = i - 1
                prev_row_options = []
                if prev_row >= 0 and prev_row < n:
                    prev_row_options = best_subs[prev_row][j]

                prev_col = j - 1
                prev_col_options = []
                if prev_col >= 0 and prev_col < m:
                    prev_col_options = best_subs[i][prev_col] 


                all_options = prev_row_options + prev_col_options

                current_coin = coins[i][j]
                current_best = [
                    (-inf, 0),
                    (-inf, 1),
                    (-inf, 2)
                ]

                is_robber = current_coin < 0
                for each_option in all_options:
                    option_total, neutralize_remaining = each_option
                    if is_robber and neutralize_remaining:
                        used = neutralize_remaining - 1
                        current_total, _ = current_best[used]
                        current_best[used] = (max(current_total, option_total), used)

                    option_total += current_coin
                    current_total, _ = current_best[neutralize_remaining]
                    current_best[neutralize_remaining] = (max(current_total, option_total), neutralize_remaining)

                best_subs[i][j] = current_best

        last_choices = [ each_choice for each_choice, _ in best_subs[-1][-1]]
        return max(last_choices)

```
['Python3']