print +( sort{ length $b <=> length $a } $s =~ m[((.)\2+)]g )[ 0 ];;