Two Characters | HackerRank

Print the length of the longest possible string $t$ you can form.