Problems
TF Problem
TF Problem
An $n$-character string consisting of a block of \textbf{T} characters followed by a block of \textbf{F} characters. Find the index of the last \textbf{T} or print $-1$ if one dosen't exists. Indexation in the string starts from $0$.
\InputFile
One line of characters of length no more than $10^6$ characters.
\OutputFile
Print the index of the last \textbf{T} character. Or print $-1$ if \textbf{T} character dosen't exists.
Input example #1
TTTTFF
Output example #1
3
Input example #2
FFFFFF
Output example #2
-1