You are given a string seq made up only of the characters 'A' and 'B'.
You may repeatedly perform the following operation:
Your task is to determine the minimum possible length of the string after performing any number of valid deletions.
Note: A substring refers to a contiguous sequence of characters.
Return the minimum remaining length.