Easy Recursive Solution using four options available
IntuitionApproachComplexity
Time complexity:

Space complexity:
Code
# Intuition
<!-- Describe your first thoughts on how to solve this problem. -->

# Approach
<!-- Describe your approach to solving the problem. -->

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

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

# Code
```cpp []
class Solution {
    long long dfs(int i, int j, vector<vector<int>>& coins, int neu,
                  vector<vector<vector<long long>>>& dp) {
        int m = coins.size();
        int n = coins[0].size();
        if (i > m - 1 || j > n - 1) {
            return INT_MIN;
        }
        if (i == m - 1 && j == n - 1) {
            if(coins[i][j]<0 && neu>0){
                return 0;
            }
            return coins[i][j];
        }
        if (dp[i][j][neu] != -1)
            return dp[i][j][neu];
        long long opt1 = coins[i][j] + dfs(i, j + 1, coins, neu, dp);
        long long opt2 = coins[i][j] + dfs(i + 1, j, coins, neu, dp);
        long long result = max(opt1, opt2);
        if (coins[i][j] < 0 && neu > 0) {
            long long opt3 = dfs(i, j + 1, coins, neu - 1, dp);
            long long opt4 = dfs(i + 1, j, coins, neu - 1, dp);
            result = max(result, max(opt3, opt4));
        }
        return dp[i][j][neu] = result;
    }

public:
    int maximumAmount(vector<vector<int>>& coins) {
        int m = coins.size(), n = coins[0].size();
        int neu = 2;
        vector<vector<vector<long long>>> dp(
            m, vector<vector<long long>>(n, vector<long long>(neu + 1, -1)));
        return dfs(0, 0, coins, neu, dp);
    }
};
```
['C++']