Alex loves solving algorithmic problems relating with strings. After solving the problem about counting the number of prefix-square free strings of length at most $n$, he is curious in the number of prefix-suffix-square free substrings of a string $s$. Can you help him?
A string is called a square string if it can be obtained by concatenating two copies of the same string (i.e. $s=uu$ for some word $u$). For example, "abab", "aa" are square strings, while "aaa", "abba" are not. A string is called prefix-suffix-square free if none of its prefixes/suffixes is a square.