Please solve the programming task below using a self-contained code snippet in a markdown code block.

You are given a string s consisting only of uppercase English letters.
You can apply some operations to this string where, in one operation, you can remove any occurrence of one of the substrings "AB" or "CD" from s.
Return the minimum possible length of the resulting string that you can obtain.
Note that the string concatenates after removing the substring and could produce new "AB" or "CD" substrings.
 
Please complete the following python code precisely:
```python
class Solution:
    def minLength(self, s: str) -> int:
```