\problemname{ABC String}

You're given a string consisting of the characters {\tt A}, {\tt B}, and {\tt C}.
The string contains the same count of {\tt A}, {\tt B}, and {\tt C} characters.

A string is \textit{beautiful} if
\begin{itemize}
    \item Its length is divisible by $3$.
    \item The string can be split evenly into contiguous substrings of size $3$, where each substring has one {\tt A}, one {\tt B}, and one {\tt C}, in any order.
\end{itemize}

For example:
{\tt ABCCBA} is a beautiful string, but {\tt ABCAB} and {\tt CCBAAB} are not beautiful.

Given a string, you want to partition it into subsequences (not necessarily contiguous) such that each subsequence is a beautiful string.

For example, for the string {\tt ABACBCAACCBB}, we can do the following:

\begin{verbatim}
AB   CA C B
  ACB  A C B
\end{verbatim}

This partitions the string into two subsequences {\tt ABCACB} and {\tt ACBACB}, both of which are beautiful strings.

For the given string, find the minimum number of subsequences you can partition it into such that each subsequence is beautiful.
It can be proven that there is always at least one such partition for all possible inputs that satisfy the input constraints.

\section*{Input}

The first line of input contains a string $s$ ($3 \le |s| \le 3 \cdot 10^5$). $|s|$ is divisible by $3$. $s$ contains an equal number of characters {\tt A}, {\tt B}, and {\tt C}.

\section*{Output}
Output a single integer, which is the minimum subsequences that $s$ can be partitioned into so each subsequence is a beautiful string.
