Python solution
IntuitionUsing Dynamic programming, we calculate all cases where after traversing a cell:
You must have 2 neutralizers remaining
You must have 1 neutralizer rem
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->
Using Dynamic programming, we calculate all cases where after traversing a cell:
1. You must have 2 neutralizers remaining
2. You must have 1 neutralizer remaining
3. You have no neutralizer remaining


# Approach
<!-- Describe your approach to solving the problem. -->
```
profits[i][j][k] = [
    max(top[0], left[0]) + coins[i][j], # You must have 2 neutralizers at the end, so you have to be robbed at this cell

    max(
        max(top[0], left[0]), # You previously had 2 neutralizers left, now you use 1 on this cell
        max(top[1], left[1]) + coins[i][j] # You have 1 neutralizer left, now you have to be robbed at this cell
    ),

    max(
        max(top[1], left[1]), # You previously had 1 neutralizer left, now you use 1 on this cell
        max(top[2], left[2]) + coins[i][j] # You previously used all your neutralizers, now you have to be robbed at this cell
    ),
]
```


# Complexity
- Time complexity:
<!-- Add your time complexity here, e.g. $$O(n)$$ -->
    O(m*n)

- Space complexity:
<!-- Add your space complexity here, e.g. $$O(n)$$ -->
    O(m*n)

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

        profits = [[[-inf, -inf, -inf] for _ in range(n + 1)] for _ in range(m + 1)]
        profits[0][1] = [0, 0, 0]

        for i in range(m):
            for j in range(n):
                top = profits[i][j + 1]
                left = profits[i + 1][j]

                profit = coins[i][j]
                profits[i + 1][j + 1] = [
                    max(top[0], left[0]) + profit,
                    max(
                        max(top[0], left[0]),
                        max(top[1], left[1]) + profit
                    ),
                    max(
                        max(top[1], left[1]),
                        max(top[2], left[2]) + profit
                    ),
                ]
        return max(profits[m][n])

```
['Python3']