We will call a string that can be obtained by concatenating two equal strings an _even_ string. For example, `xyzxyz` and `aaaaaa` are even, while `ababab` and `xyzxy` are not.  You are given an even string S consisting of lowercase English letters. Find the length of the longest even string that can be obtained by deleting one or more characters from the end of S. It is guaranteed that such a non-empty string exists for a given input.
s=list(input())
ans=0
x=len(s)
for i in range(x+1):
    s.pop(-1)
    ans+=1
    if len(s)%2==0 and s[0:i-1]==s[i:-1]:
        print(s)
        break

print(len(s))

s=list(input())

for n in range(1,len(s)-1):
    s=s[:-2]
    if s[:len(s)//2]==s[len(s)//2:]:
        break
print(len(s))
