Problem:
 Score : 200 points    Problem Statement 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.      Constraints  2 \leq |S| \leq 200  S is an even string consisting of lowercase English letters.  There exists a non-empty even string that can be obtained by deleting one or more characters from the end of S .         Input Input is given from Standard Input in the following format:  S       Output Print the length of the longest even string that can be obtained.        Sample Input 1 abaababaab      Sample Output 1 6   abaababaab itself is even, but we need to delete at least one character.  abaababaa is not even.  abaababa is not even.  abaabab is not even.  abaaba is even. Thus, we should print its length, 6 .        Sample Input 2 xxxx      Sample Output 2 2   xxx is not even.  xx is even.        Sample Input 3 abcabcabcabc      Sample Output 3 6  The longest even string that can be obtained is abcabc , whose length is 6 .       Sample Input 4 akasakaakasakasakaakas      Sample Output 4 14  The longest even string that can be obtained is akasakaakasaka , whose length is 14 .

Solution (Python):
s = input()

for x in s:
   s = s[:-1]
   if (len(s) % 2 == 0):
      half = int(len(s) / 2)
      for i in range(0, half):
         if (s[i] != s[i+half]):
            break
      if (i == half - 1):
         print(len(s))
         exit()

Solution (Python):
s = input()

t = len(s)//2

for i in range(1,t):
  u = s[:-2*i]
  if u[:len(u)//2] == u[len(u)//2:]:
    print(len(u))
    exit()

Solution (Python):
import sys
input = sys.stdin.readline

S = list(input().rstrip())
if len(S) % 2 == 0:
    S.pop()
    S.pop()
else:
    S.pop()
m = len(S) // 2
if S[:m] == S[m:]:
    print(len(S))
    sys.exit()
for i in range(len(S) // 2):
    S.pop()
    S.pop()
    m = len(S) // 2
    if S[:m] == S[m:]:
        print(len(S))
        sys.exit()

Solution (Python):
a=input()
n=len(a)
while True:
    a=a[:-1]
    n-=1
    if n%2==0:
        if a[:n//2]==a[n//2:]:
            print(n)
            exit()

Solution (Python):
s = input()
max_num = 0
for i in range(1, len(s)):
    if i % 2 == 0 and s[:i] == s[:int(i/2)] * 2:
        max_num = i
    
print(max_num)

Solution (Python):
s = list(input())

l = len(s) // 2

for i in range(1,len(s)//2):
    s.pop()
    s.pop()
    if s[:len(s)//2] == s[len(s)//2:]:
        print(len(s))
        break

Solution (Python):
s=input()
while len(s)>2:
    s=s[:len(s)-2]
    indx=len(s)//2
    if s[0:indx] == s[indx:]:
        ans=len(s)
        break
print(ans)

Solution (Python):


s=input()
n=len(s)
ss=''

def even_strings(a):
  n=len(a)
  if n%2!=0:
    return False
  
  if a[0:n//2]==a[n//2:n]:
    return True
  else:
    return False

for i in range(n-1): 
  ss+=s[i]
  if even_strings(ss):
    ret=i
    
print(ret+1)

Solution (Python):
s=input()
n=len(s)
ss=''

def even_strings(a):
  n=len(a)
  if n%2!=0:
    return False
  
  if a[0:n//2]==a[n//2:n]:
    return True
  else:
    return False

for i in range(n-1): 
  ss+=s[i]
  if even_strings(ss):
    ret=i
    
print(ret+1)

Solution (Python):
s=str(input())
flag=0
for i in range(len(s)//2):
    if flag==0:
        s=s[:-2]
        for j in range(len(s)//2):
            if s[j]!=s[(len(s)//2)+j]:
                break
            elif s[j]==s[(len(s)//2)+j] and j==(len(s)//2)-1:
                print(len(s))
                flag=1
                break

Solution (Python):
S = [c for c in input()]
while len(S):
    S.pop()
    if len(S) % 2 == 0 and S[:len(S)//2] == S[len(S)//2:]:
        print(len(S))
        exit()

Solution (Python):


s = input()

def check(txt):
    if len(txt)%2==1:
        return False
    else:
        half = len(txt)//2


        
        if txt[:half] == txt[half:]:
            return True
        else:
            return False

c = len(s)
while True:
    c -= 1
    txt = s[:c]


    if check(txt):
        print(len(txt))
        break

Solution (Python):
s = list(str(input()))

for _ in range(len(s)//2-1):
    del s[-2:]
    cnt = 0

    for i in range(len(s)//2):
        if s[i]==s[len(s)//2+i]:
            cnt += 1

    if cnt==len(s)//2:
        break

print(len(s))

Solution (Python):
s = input()
s = s[:-2]
while False in [s[i]==s[i+len(s)//2] for i in range(len(s)//2)]:
    s = s[:-2]
print(len(s))

Solution (Python):
s=str(input())

List=list(s)
List.pop(-1)

ans=0
for i in range((len(List)//2)+1):
    R=List[0:i]
    L=List[i:i+len(R)]
    
    if(R==L):
        
        ans=len(R)*2

print(ans)

Solution (Python):
s=[i for i in input()]
del s[-1]
while len(s)>1:
  l=len(s)
  if l%2!=0:
    del s[-1]
    continue
  if s[0:l//2]==s[l//2:]:
    print(l)
    break
  else:
    del s[-1]

Solution (Python):
s = list(str(input()))

for i in range(10**18):
    s.pop()
    if len(s)%2:
        continue
    else:
        for j in range(len(s)//2):
            if s[j] != s[j+len(s)//2]:
                break
        else:
            print(len(s))
            exit(0)
            continue

Solution (Python):
s=input()
for i in range(len(s)):
    s=s[:-2]
    if s[:len(s)//2]==s[len(s)//2:]:
        print(len(s))
        break

Solution (Python):
s=list(input())

for i in range(1,len(s)):
    if (len(s)-i)%2==0:
        a=0
        for j in range((len(s)-i)//2):
            if s[j]!=s[j+(len(s)-i)//2]:
                a+=1
        if a==0:
            print(len(s)-i)
            break

Solution (Python):
s=list(input())


while True:
        s.pop(-1)
        if s[:len(s)//2] == s[len(s)//2:]:
            print(len(s))
            break

Solution (Python):
S=input()
S=S[0:-2]
while S[0:int(len(S)/2-1)]!=S[int(len(S)/2):len(S)-1]:
    S=S[0:-2]
print(len(S))

Solution (Python):
S = input()

for i in range(1, len(S)):
    s = S[:-i]
    n = len(s)
    if n % 2 == 1:
        continue
    a = s[:n // 2]
    b = s[n // 2:]
    if a == b:
        print(n)
        break

Solution (Python):
import sys

S = (input())

l = len(S)//2
if len(S)==2:
    if S[0]==S[1]:
        print(len(S))
        sys.exit()
for i in range(l):
    S = S[0:len(S)-2]
    a = S[0:len(S)//2]
    b = S[len(S)//2:]

    if a==b:
        print(len(S))
        sys.exit()

Solution (Python):

s = list(input())


for i in range(len(s)):
    s.pop()
    if len(s) % 2 != 0:
        pass
    else:
        if s == s[:len(s)//2] * 2:
            break

print(int(len(s)))

Solution (Python):

s = list(input())


for i in range(len(s)):

    s.pop()

    if len(s) % 2 != 0:
        pass
    else:
        if s == s[:len(s)//2] * 2:
            break

print(int(len(s)))

Solution (Python):

 
import math
import itertools
import sys
import copy
 




S = str(input())

if len(S)%2 == 1 :
  S = S[0:-1]
else :
  S = S[0:-2]

while (True) :
  if S[0:len(S)//2] == S[len(S)//2:] :
    print (len(S))
    exit()
  else :
    S = S[0:-2]

Solution (Python):

S = input()

S = S[0:len(S)-1]
if len(S) % 2 == 0:
    while True:
        if len(S) == 2:
            if S[0] == S[1]:
                print(2)
                exit()
            else:
                print(1)
                exit()
            
        left = S[0:len(S)//2]
        right = S[len(S)//2:len(S)]
        if left == right:
            print(len(S))
            exit()
        else:
            S = S[0:len(S)-2]
else:
    S = S[0:len(S)-1]
    while True:
        if len(S) == 2:
            if S[0] == S[1]:
                print(2)
                exit()
            else:
                print(1)
                exit()
            
        left = S[0:len(S)//2]
        right = S[len(S)//2:len(S)]
        if left == right:
            print(len(S))
            exit()
        else:
            S = S[0:len(S)-2]

Solution (Python):
s=input()
for i in range(1,len(s)):
  if s[:(-i*2)] == s[:(len(s)-2*i)//2]*2:
    print(len(s[:-i*2]))
    break

Solution (Python):
S=list(input())
while True:
  S.pop(-1)
  if len(S)%2==0:
    h=len(S)//2
    if len(S)==0 or S[:h]==S[h:]:
      print(len(S))
      break

Solution (Python):
s=input()
maxlen=0
for i in range(len(s)):
  ss=s[:-i]
  if ss[:len(ss)//2]==ss[len(ss)//2:]:
    maxlen=(max(len(ss),maxlen))
print(maxlen)

Solution (Python):
s=input()
l=len(s)
for i in range(1,l//2):
    k=(l-i*2)
    
    
    if s[:k//2]==s[k//2:k]:
        print(k)
        break

Solution (Python):
s=input()[:-1]
while True:
    if len(s) % 2 == 0:
        
        if s[:len(s)//2] == s[len(s)//2:]:
            print(len(s))
            break
    s = s[:-1]

Solution (Python):
S=str(input())
answer=0
for i in range(len(S)//2-1):
  T=S[:i+1]*2
  if S[:2*i+2]==T:
    answer=2*(i+1)
print(answer)

Solution (Python):
S = list(input())

S.pop()

while True:
    l = len(S)//2
    if S[:l] == S[l:]:
        break
    else:
        S.pop()

print(len(S))

Solution (Python):
s = input()
ls = len(s)
for i in range(ls//2-1, 0, -1):
    if s[:i] == s[i:2*i]:
        print(2*i) 
        exit()

Solution (Python):
S = input()

S = S[:-2]
while S[:len(S)//2] != S[len(S)//2:]:
  S = S[:-2]
print(len(S))

Solution (Python):
S = input()


while len(S) != 0:
    S = S[:-1]
    l = len(S)*0.5
    if l.is_integer():
        l = int(l)
        if S[l:] == S[:l]:
            print(l*2)
            break

Solution (Python):
S = input()
while 1:
    S = S[:-2]
    if S[:len(S)//2] == S[len(S)//2:]:
        break
print(len(S))

Solution (Python):
S = input()

listS = list(S)
ans = []
for i in range(len(S)):
    listS.pop(-1)
    if len(listS) % 2 == 0 and  (listS[0:int((len(listS))/2)]) == (listS[int((len(listS))/2):]):
        ans.append(len(listS))

    
    
print(max(ans))

Solution (Python):
S = input()
N = len(S)

for i in range(2, 300, 2):
  T = S[:-i]
  if T[:(N - i) // 2] == T[(N - i) // 2:]:
    print(N - i)
    exit()

Solution (Python):
S = list(input())

while len(S) > 1:
    S.pop()
    if len(S) % 2 == 0 and S[:len(S) // 2] == S[len(S) // 2:]:
        print(len(S))
        break

Solution (Python):
import sys

s = sys.stdin.readline().rstrip()

def main():
    l = len(s)
    t = s[:-1] if l & 1 else s
    l = len(t)
    while True:
        t = t[:-2]
        l -= 2
        if t[:l//2] * 2 == t:
            return l

if __name__ == '__main__':
    ans = main()
    print(ans)

Solution (Python):
s = input()

for i in range(1,len(s)):
    a = s[:(len(s) - i) // 2]
    b = s[(len(s) - i) // 2: len(s) - i]
    if a == b:
        print(len(s) - i)
        import sys
        sys.exit()

Solution (Python):
s = input()

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

Solution (Python):
s=input()
for i in range(len(s)):
    s=s[:-1]
    if len(s)%2==0 and s[0:len(s)//2]==s[len(s)//2:len(s)]:
        break
print(len(s))

Solution (Python):
s = input()
for k in range(len(s)//2-1, 0, -1):
  if s[:k] == s[k:2*k]: break
print(k*2)

Solution (Python):
s = input()
for i in range(1, len(s)):
    back = len(s) - i
    if back % 2 == 0 and s[:back // 2] == s[back // 2:back]:
        print(len(s[:back]))
        exit()

Solution (Python):
s=list(input())
num=(len(s)-2)//2
def moji(s): 
    c=0
    half=len(s)//2
    for i in range(half):
        if s[i]!=s[i+half]:
            c=1
            break
    return c

exit=0
for i in range(num):
    del s[-1]
    del s[-1]
    check=moji(s)
    if check==0: 
        exit=1
        break
print(len(s))

Solution (Python):
s=list(input())
num=(len(s)-2)//2
def moji(s): 
    c=0
    half=len(s)//2
    for i in range(half):
        if s[i]!=s[i+half]:
            c=1
            break
    return c

exit=0
for i in range(num):
    del s[-1]
    del s[-1]
    check=moji(s)
    if check==0: 
        exit=1
        break
print(len(s) if exit==1 else 1)

Solution (Python):
s = str(input())

for i in range(1, len(s)):
    s_del = s[:(-1)*i]
    if len(s_del) % 2 == 1:
        continue
    else:
        half = int(len(s_del) / 2)
        if s_del[:half] == s_del[half:]:
            ans = len(s_del)
            break

print(ans)

Solution (Python):
s = input()
s = s[:-2] if len(s) % 2 == 0 else s[:-3]
for i in range(len(s),0,-2):
    if s[:i//2] == s[i//2:]:
        ans = i
        break
    else:
        s = s[:-2]
    
print(ans)

Solution (Python):
S = input()
N = len(S)

for i in range(1, N):
    t = (S[:-1 * i])
    l = len(t)
    if t[:l//2] == t[l//2:]:
        break

print(l)

Solution (Python):
s = input()

ans = 0
for i in range(len(s)):
    s2 = s[:i]

    
    f = True
    if len(s2) % 2 == 1:
        f = False
    else:
        for i in range(len(s2) // 2):
            if s2[i] != s2[i + len(s2) // 2]:
                f = False
    if f:
        ans = max(ans, len(s2))
print(ans)

Solution (Python):
s = input()
n = len(s)

def check(s):
    n = len(s)
    if n%2 == 0:
        if s[:n//2] == s[n//2:]:
            return True
        else:
            return False
    else:
        
        return False

for i in range(n):
    if i != 0 and check(s):
        break
    s = s[:-1]
    
print(len(s))

Solution (Python):
import sys

sys.setrecursionlimit(10 ** 6)
int1 = lambda x: int(x) - 1
p2D = lambda x: print(*x, sep="\n")
def MI(): return map(int, sys.stdin.readline().split())
def LI(): return list(map(int, sys.stdin.readline().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def main():
    s=input()
    for w in range((len(s)-1)//2,0,-1):
        if s[:w]==s[w:w*2]:
            print(w*2)
            break

main()

Solution (Python):
s=input()
flag=0
for i in range(1, len(s)//2+1):
    p=s[:-2*i]
    if p[:len(p)//2]==p[len(p)//2:]:
        print(len(p))
        flag=1
        break
    if flag:
        break
    else:
        continue

Solution (Python):
s = input()
for i in range(2, len(s)+1, 2):
    s2 = s[:-i]
    s2len = len(s2)
    if s2[:s2len//2] == s2[s2len//2:]:
        print(s2len)
        break

Solution (Python):
s=input()
ans=0
s=s[:-1]
for i in range(len(s)):
    if len(s)%2==0:
        if s[:len(s)//2]==s[len(s)//2:]:
            ans=max(len(s),ans)
            
        else:
            s=s[:-2]
    else:
        s=s[:-1]
print(ans)

Solution (Python):
s=input()
while True:
    s=s[:-1]
    if(len(s)%2==0):
        if(s[:len(s)//2]==s[len(s)//2:]):
            print(len(s))
            exit()

Solution (Python):
S = list(input())
S.pop(-1)
while True:
    if len(S)%2 != 0:
        S.pop(-1)
    c = 0
    for i in range(len(S)//2):
        if S[i] != S[i+len(S)//2]:
            c = 1
            del S[-2:]
            break
    if c == 0:
        break
print(len(S))

Solution (Python):
l=list(input())
l.reverse()
s="".join(l)

for i in range(len(s)):
    s=s.replace(s[0],"",1)
    s1=s[:(len(s)//2)]
    s2=s[(len(s)//2):]
    if s1==s2:
        print(2*len(s1))
        exit()

Solution (Python):
S = str(input())
l = [str(x) for x in list(str(S))]
for i in range(int(len(l)/2)):
    l.pop(-1)
    l.pop(-1)
    tmp = "".join(l)
    if tmp[:int(len(l)/2)] == tmp[int(len(l)/2):]:
        print(len(l))
        break
    else:
        continue

Solution (Python):
s = input()

for i in range(2, len(s), 2):
    s0 = s[:(-1)*i]
    half = int(len(s0)/2)
    s1 = s0[:half]
    s2 = s0[half:]
    if s1 == s2:
        print(len(s0))
        break

Solution (Python):
S = list(input())
l = len(S)
for i in range(l) :
    S.pop(-1)
    if i % 2 != 0 :
        A = S[0:len(S)//2]
        B = S[len(S)//2:len(S)]
        if A == B :
            print(len(S))
            break

Solution (Python):
S=input()

buf=list(S)

result=0

for i in range(len(S)):
    del buf[-1]
    if(len(buf)%2==0):
        tmp="".join(buf[0:int(len(buf)/2)])
        if "".join(buf).count(tmp)==2:
            result=len(buf)
            break

print(result)

Solution (Python):
S = list(input())
before = S[:len(S) // 2]
after = S[len(S) // 2:]
for i in range(len(S) // 2):
    tmp = before.pop(-1)
    after.insert(0 , tmp)
    after.pop(-1)
    after.pop(-1)
    if before == after:
        break
print(len(before) * 2)

Solution (Python):
import sys
S = input()
n = (len(S)-1)//2
for i in range(n,0,-1):
  if S[:i]*2==S[:2*i]:
    print(2*i)
    sys.exit()

Solution (Python):
S = input()
S = S[:-1]
while S[:len(S)//2] != S[len(S)//2:]:
    S = S[:-1]
    
print(len(S))

Solution (Python):
s = input()[:-1]
if len(s) == 0:
    print(0)
    quit()
for i in range(len(s) - 1, -1, -1):
    if i % 2 == 1:
        l = i // 2 + 1
        if s[: l] == s[l : i + 1]:
            print(2 * l)
            quit()
print(0)

Solution (Python):
import numpy as np
S=input()

for i in range(len(S)):
    tmp=S[:-i-2]
    if len(tmp)%2!=0:
        continue
    else:
        tmp=list(tmp)
        tmp=list(np.array_split(tmp,2))
        if (tmp[0]==tmp[1]).all():
            break

print(len(tmp[0])*2)

Solution (Python):
s = input()

leng = len(s)

for i in range(110):
	if s[0:int((leng-2)/2)] == s[int((leng-2)/2):leng-2]:
		print(leng-2)
		break
	else:
		leng = leng - 2

Solution (Python):
s = input()
while s:
  s = s[:-1]
  c = len(s)//2
  if s[:c] == s[c:]:
    print(len(s))
    break

Solution (Python):
def judge_ss(word):
    l = len(word)
    
    if l % 2 != 0:
        return 0
    
    for i in range(l//2):
        if word[i] != word [i+l//2]:
            return 0

    return 1
    
S = list(input())
l = len(S)

ans = 0

for i in range(1,l-1):
    if judge_ss(S[:l-i]):
        print(len(S[:l-i]))
        break

Solution (Python):
S = input()
for i in range(len(S)):
  s = S[:len(S)-i]
  if len(s)%2 == 0 and i !=0 :
    if s[:int(len(s)/2)] == s[int(len(s)/2):]:
      print(len(s))
      break

Solution (Python):
S = input()
S2 = ''
counter = len(S)
for i in range(len(S)):
  S = S[:-1]
  if len(S) %2 == 0:
    if S[:int(len(S)/2)] == S[int(len(S)/2):]:
      break
print(len(S))

Solution (Python):
S=input()

for i in range(len(S)-1,0,-1):
    if i%2:
        continue
    else:
        t=i//2
        if S[:t]==S[t:i]:
            print(i)
            break

Solution (Python):
S = input()
ans = None

for i in range(len(S) - 1, -1, -1):
    t = S[:i]
    size = len(t) // 2
    if t[:size] == t[size:]:
        ans = len(t)
        break

print(ans)

Solution (Python):
s = input()
while s:
    s = s[:-1]
    i = len(s)//2
    if s[:i] == s[i:]:
        print(len(s))
        break

Solution (Python):
s = list(input())
ans = 0
for i in range(1,len(s)):
  if i % 2 != 0:
    s.pop()
    continue
  else:
    s.pop()
    s1 = s[0:(len(s)//2)]
    s2 = s[(len(s)// 2) :]
    if s1 == s2:
      ans = len(s)
      break
print(ans)

Solution (Python):
S=input() 
lenS=len(S) 
i=0 


while i<lenS:
    i+=1 
    Si=S[:lenS-i] 
    lenSi=len(Si) 

    if lenSi%2==1: 
        continue

    if Si[:lenSi//2]==Si[lenSi//2:]: 
        break

print(lenSi)

Solution (Python):

S = input()
for _ in range(len(S)):
    S = S[0:len(S)-2]
    if S[0:len(S)//2] == S[len(S)//2:len(S)]:
        break
    else:
        pass
print(len(S))

Solution (Python):
from sys import stdin

s = stdin.readline().rstrip()

if len(s)%2 == 0:
    s = s[:-2]
else:
    s = s[:-1]

while True:
    if s[:len(s)//2] == s[len(s)//2:]:
        print(len(s))
        exit()
    s = s[:-2]

Solution (Python):
S = str(input())

for i in range(len(S)):
    A = S[:len(S) - i - 1]
    if len(A) % 2 == 0:
        X = len(A) // 2
        if A[:X] == A[X:]:
            print(len(A))
            break

Solution (Python):
words = list(input())

def is_even_word(s):
  s_len = len(s)
  if s_len % 2 != 0:
    return False
  h = int(s_len/2)
  return s[:h] == s[h:]

l = len(words) - 1
for s in words:
  word = words[:l]
  if is_even_word(word):
    print(l)
    exit(0)
  l -= 1

print(0)

Solution (Python):
S = input()
S = S[:len(S)-1]
while(True):
    A = S[:int(len(S)/2)]
    B = S[int(len(S)/2):]
    if(A == B):
        print(len(S))
        break
    S = S[:len(S)-1]

Solution (Python):
s = input()

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

print(len(s))

Solution (Python):
s = input()
while True:
    s = s[:-2]
    n = len(s)
    if s[:int(n/2)] == s[int(n/2):]:
        print(n)
        print
        exit()

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

Solution (Python):
s = input()
for i in range(1,len(s)):
    if s[:(len(s)-i)//2] == s[(len(s)-i)//2:(len(s)-i)]:
        print(len(s)-i)
        exit()
print(0)

Solution (Python):
S = input()
ans = 0
N = len(S)
for i in range(1,N):
    tmp = S[0:N-i]
    M = len(tmp)
    if M % 2 != 0:
        continue
    flg = False
    for k in range(M//2):
        if tmp[k] != tmp[M//2+k]:
            flg = False
            break
        flg = True
    if flg:
        print(M)
        exit()

Solution (Python):
s = input()
length = len(s)
count = 0
for i in range(len(s)) :
    s = s[:-1]
    count += 1
    if len(s) % 2 == 1:
        continue
    elif s[:len(s) // 2] == s[len(s) // 2:] :
        print(length-count)
        break

Solution (Python):
s = input()
for i in range(len(s)-1, 0, -1):
  t = s[:i]
  l = len(t)
  if l%2==0 and t[:l//2] == t[l//2:]:
    print(l)
    break

Solution (Python):
S = input()

while True:
    S = S[:-2]
    n = len(S)
    if S[:int(n/2)] == S[int(n/2):]:
        print(n)
        exit()

Solution (Python):
s=list(input())
while s!=[]:
    s.pop(len(s)-1)
    if len(s)%2==1:
        continue
    else:
        if s[:len(s)//2]==s[len(s)//2:]:
            print(len(s))
            break

Solution (Python):
S = input()

while True:
    S = S[:-2]
    n = len(S)
    if S[:int(n/2)] == S[int(n/2):]:
        print(n)
        print
        exit()

Solution (Python):
def chk(s):
    if len(s) % 2 == 0 and s[len(s)//2:] == s[:len(s)//2]:
        return 1
    return 0

S = input()
for i in range(len(S))[::-1]:
    if chk(S[:i]):
        print(i)
        break

Solution (Python):
def examB():
    St = S()
    N = len(St)
    is_evenl = True
    cur = 0
    for i in range((N-1)//2):
        is_evenl = True
        for j in range(i+1):
            if St[j]!=St[i+j+1]:
                is_evenl = False

        if is_evenl:
            cur = (i+1)*2
    print(cur)


import sys
import copy
import bisect
import heapq
from collections import Counter,defaultdict,deque
def I(): return int(sys.stdin.readline())
def LI(): return list(map(int,sys.stdin.readline().split()))
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
mod = 10**9 + 7
inf = float('inf')

examB()

Solution (Python):
a=input()
tmp=0
ans=0
for i in range(len(a)-1):
    a=a[:-1]
    if len(a)%2==0:
        x=int(len(a)/2)
        if a[:x]==a[x:]:
            tmp=len(a[:x])*2
            ans=max(tmp,ans)
print(ans)

Solution (Python):

s = input()
is_even_string = False

s = s[:-1]
while not is_even_string:
    if len(s) % 2 == 0:
        if s[:len(s) // 2] == s[len(s) // 2:]:
            is_even_string = True
    s = s[:-1]

print(len(s) + 1)

Solution (Python):
S = input()
if len(S)%2 == 0: S = S[:-1]

for i in range(1,len(S)//2+1):
  if S[:i] == S[i:i*2]: ans = i
print(ans*2)

Solution (Python):
s = list(input())

while len(s) >= 0:
    s.pop(-1)
    s.pop(-1)
    length = len(s)
    head = s[:(length//2)]
    tail = s[(length//2):]
    if head == tail:
        print(len(head) + len(tail))
        exit()

Solution (Python):
S = input()
letters = len(S)

for i in range(letters):
    letter_2 = letters - (i + 1)
    s = S[:letter_2]
    if s[:(letter_2 // 2)] == s[(letter_2 // 2):]:
        print(len(s))
        break

Solution (Python):
S = input()
len_S = len(S)
for i in range(len_S-1):
  P =  S[:(len_S-i)//2] == S[(len_S-i)//2:(len_S-i)-1]
  if P:
    print(len_S - (i+1))
    break;

Solution (Python):
S = input()
len_S = len(S)
for i in range(len_S-1 // 2-1):
  P =  S[:(len_S-i)//2] == S[(len_S-i)//2:(len_S-i)-1]
  if P:
    print(len_S - (i+1))
    break;

Solution (Python):
s = input()
s_len = len(s)
ans = 0
for i in range(1, s_len):
    if (s_len-i)%2 == 0:
        if s[:(s_len-i)//2] == s[(s_len-i)//2:s_len-i]:
            ans = s_len - i
            break
print(ans)

Solution (Python):
S=input()
for i in range(2,len(S)+1,2):
    S_strip=S[:-i]
    S_len=int(len(S_strip)/2)
    S_double=S_strip[:-S_len]*2
    if S_double==S_strip:
        print(len(S_strip))
        break

Solution (Python):
S = input()
while len(S) > 2:
    S = S[:-2]
    S_l = S[:len(S)//2]
    S_r = S[len(S)//2:]
    if S_l == S_r:
        print(len(S))
        break

Solution (Python):
from collections import Counter,defaultdict,deque
from heapq import heappop,heappush,heapify
import sys,bisect,math,itertools
sys.setrecursionlimit(10**8)
mod = 10**9+7
def inp(): return int(sys.stdin.readline())
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpln(n): return list(int(sys.stdin.readline()) for i in range(n))

s = input()
n = len(s)
for i in range(n):
    tmp = s[:-1-i]
    l = len(tmp)
    if l%2:
        continue
    if tmp[:l//2] == tmp[l//2:]:
        print(l)
        break

Solution (Python):
def ss(s):
    n=len(s)
    if n%2==1:
        return False
    else:
        m=n//2
        s1=s[:m]
        s2=s[m:]        
        for i in range(m):
            if s1[i]!=s2[i]:
                return False
        return True

S=input()
for i in range(1,len(S)):
    if ss(S[:-i]):
        print(len(S)-i)
        break

Solution (Python):
s = input()[:-1]
while s[:len(s)//2]!=s[len(s)//2:]:s = s[:-1]
print(len(s))

Solution (Python):
s = input()
while len(s)>1:
  s = s[:-1]
  h = int(len(s)/2)
  if s[:h]==s[h:]:
    print(len(s))
    exit()

Solution (Python):
S = input()
len_s = len(S)
for i in range(2, len_s, 2):
    deleted_str = S[:-i]
    center = (len_s - i) // 2
    mae = deleted_str[:center]
    ato = deleted_str[center:]
    if mae == ato:
        print(len(deleted_str))
        break

Solution (Python):
s = input()
l = len(s)
while len(s) >=0:
    s = s[:len(s)-2]
    if s[:len(s)//2] == s[len(s)//2:]:
        print(len(s))
        break

Solution (Python):
s = list(input())


while len(s) != 0:
    s.pop()
    if len(s) % 2 == 0 and s[len(s)//2:] == s[:len(s)//2]:
        print(len(s))
        exit()

Solution (Python):
st=input()
s=list(st)
if len(st)==2:print(1)
else:
  for i in range(len(s)):
    s.pop();s.pop()
    if s[0:len(s)//2]==s[len(s)//2:]:
      print(len(s))
      exit()

Solution (Python):
s=list(input())
while True:
    s.pop(-1)
    l = len(s)
    if l%2==0:
        forward = s[:l//2]
        backword = s[l//2:]
        if forward==backword:
            print(len(forward)*2)
            exit()
    else:
        continue

Solution (Python):
import sys
input = sys.stdin.readline

s = input().rstrip()     
if len(s) % 2 == 1: s = s[:-1]
else: s = s[:-2]

for _ in range(len(s) // 2):
    if s.count(s[:len(s) // 2]) == 2: print(len(s));  exit()
    else: s = s[:-2]
print(0)

Solution (Python):
import sys
from functools import reduce
import copy
import math
from pprint import pprint
import collections
import bisect


sys.setrecursionlimit(4100000)


def inputs(num_of_input):
    ins = [input() for i in range(num_of_input)]
    return ins


def int_inputs(num_of_input):
    ins = [int(input()) for i in range(num_of_input)]
    return ins


def solve(inputs):
    S = inputs[0]
    for i in range(len(S)-1):
        new_s = S[:len(S) - i - 1]
        if len(new_s) % 2 != 0:
            continue
        half = len(new_s) // 2
        front = new_s[:half]
        tail = new_s[half:]

        if front == tail:
            return len(new_s)
    return 0


def string_to_int(string):
    return list(map(int, string.split()))


if __name__ == "__main__":
    ret = solve(inputs(1))
    print(ret)

Solution (Python):

S = str(input())

S = list(S)

if len(S)==2:
    print(1)
else:
    for i in range(len(S)):
        S.pop()
        S.pop()
        if S[0:len(S)//2] == S[len(S)//2:]:
            print(len(S))
            break

Solution (Python):
S = list(input())
if len(S)%2 != 0:
    del S[-1]
else:
    del S[-1]
    del S[-1]
while S[:int(len(S)/2)] != S[int(len(S)/2):]:
    del S[-1]
    del S[-1]
print(len(S))

Solution (Python):
S = input()
l = len(S)
ans = 0
for i in range(1,l):
    s = S[0:l-i]
    if len(s) % 2 == 0:
        l2 = len(s)//2
        if s[:l2] == s[l2:]:
            ans = l-i
            break
print(ans)

Solution (Python):
s = input()
for i in range(len(s)):
    if i != 0 and (len(s)-i) % 2 == 0:
        if s[:(len(s)-i)//2] == s[(len(s)-i)//2:len(s)-i]:
            print(len(s)-i)
            break

Solution (Python):
S=input()
while True:
  S=S[:-1]
  if len(S)%2==0:
    if S[:len(S)//2]==S[len(S)//2:]:
      print(len(S))
      break

Solution (Python):
S = input()

for i in range(2, len(S), 2):
  s = S[:-i]
  if s[:len(s)//2] == s[len(s)//2:]:
    print(len(s))
    exit()

Solution (Python):
S = input()
for i in range(len(S)):
  S = S[:-1]
  if len(S) % 2 == 0:
        if S[:int(len(S)/2)] == S[int(len(S)/2):]:
            ans = len(S)
            break;
print(ans)

Solution (Python):
S = input()[:-1]

while True:
    s_len = len(S)
    if s_len % 2 == 0:
        if S[:s_len//2] == S[s_len//2:]:
            print(s_len)
            break
        else:
            S = S[:-2]
    else:
        S = S[:-1]

Solution (Python):
slis=list(map(str,input()))
max=0
for i in range(int(len(slis)//2)):
	if slis[0:i]==slis[i:2*i]:
		max=i
print(2*max)

Solution (Python):
S=list(input())
S.pop()

ans=0
for i in range(len(S)):
    if S[:i]==S[i:i*2]:
        ans=i

print(ans*2)

Solution (Python):
S = list(input())

while True:
    S.pop()
    if len(S) % 2 != 0:
        continue
    temp = ''.join(S)
    if temp[:int(len(S)/2)] == temp[int(len(S)/2):]:
        print(len(S))
        exit()

Solution (Python):
S = input().strip()
N = len(S)
for i in range(2,N,2):
    if S[:N//2-i//2]==S[N//2-i//2:-i]:
        print(N-i)
        break

Solution (Python):
s = list(input())

count = len(s) - 1
ans = 0

while count > 0:
    
    
    
    if count % 2 == 0:
        if s[0 : count // 2] == s[count // 2 : count]:
            ans = max(ans, count)
    count -= 1

print(ans)

Solution (Python):

S = input()
N = len(S)
ans = 0
for i in range(1,N):
    ss = S[0:N-i]
    if len(ss)%2 == 1:
        continue
    n = len(ss)//2
    sf = ss[0:n]
    st = ss[n:N+1]
    if sf == st:
        ans = max(ans,len(ss))

print(ans)

Solution (Python):
s = input()
s = s[:-1]
for i in range(len(s)):
    r = len(s)
    if r %2 == 0:
        if s[:r//2] == s[r//2:]: 
            print(len(s))
            break
        else:
            s = s[:-1]
    else:
        s = s[:-1]

Solution (Python):

S = open(0).read()
if len(S)%2 != 0:
    S=S[:-3]
else:
    S=S[:-2]
for i in range(int(len(S)/2)):
    
    
    
    if S[:int(len(S)/2)] == S[int(len(S)/2):]:
        print(len(S))
        break
    else:
        S=S[:-2]

Solution (Python):
s=input()
i=len(s)-1
while i>0:
    if s[0:i//2]==s[i//2:i]:
        print(i)
        break
    i-=1

Solution (Python):
s = input()
len_s = len(s)
for count in range(1, len_s+1):
  sub_s = s[:-count]
  if len(sub_s) % 2 == 0:
    half_len_sub = int(len(sub_s) / 2)
    if sub_s[:half_len_sub] == sub_s[half_len_sub:]:
      print(len_s - count)
      exit()

Solution (Python):
s=str(input())[:-1]
if len(s)%2!=0:
    s=s[:-1]
a=len(s)//2
for i in range(len(s)):
    if s[0:a]==s[a:]:
        print(a*2)
        break
    else:
        a-=1
        s=s[:-2]

Solution (Python):
s,i=input(),1
while s[:(len(s)-2*i)//2] != s[(len(s)-2*i)//2:-2*i]:i += 1
else:print(len(s)-2*i)