using python3
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
```python3 []
class Solution:
    def calPoints(self, operations: List[str]) -> int:
        stack=[]
        for i in operations:
            if i=="C":
                stack.pop()
            elif i=="D":
                stack.append(2*stack[-1])
            elif i=="+":
                stack.append(stack[-1]+stack[-2])
            else:
                stack.append(int(i))  
        return sum(stack)

```
['Python3']