import re;print((len(re.match(r"(.+)\1",input()[:-1]).group())))
s=input()[:-1];print((max(i*2for i in range(99)if s[:i]==s[i:i*2])))
import re

print((len(re.match(r"(.+)\1", input()[:-1]).group())))

s = input()[:-1]
print((max(i * 2 for i in range(99) if s[:i] == s[i : i * 2])))

-import re - -print((len(re.match(r"(.+)\1", input()[:-1]).group()))) +s = input()[:-1] +print((max(i * 2 for i in range(99) if s[:i] == s[i : i * 2])))