output_description: Print the eventual length of X.
  
  * * *
input_description: The input is given from Standard Input in the following format:
  
      
      
      X
attempt: TSSTTTSS
  
problem_description: Statement
  
  We have a string X, which has an even number of characters. Half the
  characters are `S`, and the other half are `T`.
  
  Takahashi, who hates the string `ST`, will perform the following operation
  10^{10000} times:
  
    * Among the occurrences of `ST` in X as (contiguous) substrings, remove the leftmost one. If there is no occurrence, do nothing.
  
  Find the eventual length of X.
samples: [{"input": "TSTTSS", "output": "4\n    \n\nIn the 1-st operation, the 2-nd and 3-rd characters of `TSTTSS` are removed. X\nbecomes `TTSS`, and since it does not contain `ST` anymore, nothing is done in\nthe remaining 10^{10000}-1 operations. Thus, the answer is 4.\n\n* * *"}, {"input": "SSTTST", "output": "0\n    \n\nX will eventually become an empty string: `SSTTST` \u21d2 `STST` \u21d2 `ST` \u21d2 ``.\n\n* * *"}, {"input": "TSSTTTSS", "output": "4\n    \n\nX will become: `TSSTTTSS` \u21d2 `TSTTSS` \u21d2 `TTSS`."}]