18

Given a string as argument, output the length of the longest(s) non-overlapping repeated substring(s) or zero if there is no such string.
You can assume the input string is not empty.
Examples
abcdefabc : the substring abc is repeated at positions 1 and 7, so the program should output 3
abcab...