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 _ in range(len(s)):
  s=s[:-1]
  s_len=len(s)
  if s_len%2==0 and s[:s_len//2] == s[s_len//2:]:
    print(s_len)
    break

Solution (Python):
s = input()

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

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

Solution (Python):
s = input()
ans = 0
for i in range(len(s)-1):
  x = s[:i+1]
  y = s[i+1:2*i+2]
  if x==y and x+y!=s:
    ans = len(x+y)
print(ans)

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

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):
s = input()
m = 0
for i in range(len(s)):
    if (i + 1) % 2 == 0:
        t = s[:i+1]
        b = True
        for j in range(len(t) // 2):
            if t[j] != t[j+len(t)//2]:
                b = False
        if b:
            if s != t:
                m = max(m, len(t))
print(m)

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):
S = input()
N = len(S)
if N%2 == 1:
    N -= 1
else:
    N-=2
while(True):
    if(S[:N//2] == S[N//2:N]):
        print(N)
        exit(0)
    N -= 2

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

Solution (Python):
s = input()
for i in reversed(range(len(s)-1)):
  if (i + 1) % 2 == 0:
    ss = s[:i+1]


    if ss[:int((i+1)/2)] == ss[int((i+1)/2):]:
      print(i+1)
      exit()

Solution (Python):
s = input()

for i in range(len(s)):
  s = s[:-1]
  half_f = s[int(len(s)/2):]
  half_l = s[:int(len(s)/2)]
  
  if len(s)%2 == 0 and half_f == half_l :
    print(len(s))
    break

Solution (Python):
def estr(s):
    if len(s) % 2 == 1:
        return False
    else:
        for i in range(len(s) // 2):
            if s[i] != s[i + len(s) // 2]:
                return False
    return True

s = input()

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

print(len(s))

Solution (Python):
s=input()
s=s[:len(s)-1]
flag=True

while(flag):
    if len(s)%2==0:
        left=s[:len(s)//2] 
        right=s[len(s)//2:]
        if left==right:
            print(len(s))
            flag=False
        else:
            s=s[0:len(s)-1]
    else:
        s=s[0:len(s)-1]

Solution (Python):
s = list(input())
s.pop()
if len(s) % 2 !=0:
    s.pop()

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

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

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

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

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):
A = str(input())
A = A[:-2]
N = len(A)
while A[:N//2] != A[N//2:]:
    A = A[:-2]
    N = len(A)
print(len(A))

Solution (Python):
S = input()

cnt = 0
while len(S) > 2:
    cnt += 1
    S = S[:-1]
    half = len(S)//2
    if S[:half] == S[half:]:
        print(len(S))
        exit()

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

Solution (Python):
s = list(input())
l = len(s)//2

l2 = 0
ans = 0

for i in range(1,len(s)//2):
  s2 = s[0:-2*i]
  
  l2 = len(s2)//2
  if s2[0:l2]==s2[l2:]:
    ans = len(s2)
    break

print (ans)

Solution (Python):
s = input()

ans=0
for i in range(2,len(s),2):
    if s[:i//2]==s[i//2:i]:
        ans=i
print(ans)

Solution (Python):

def is_evenstring(s):
    if s[:len(s)//2] == s[len(s)//2:]:
        return True
    else:
        return False


S = input()


while True:
    S = S[0:-1]
    if is_evenstring(S):
        res = len(S)
        break

print(res)

Solution (Python):
S = input()
ans = 0
for i in range(len(S)-2)[::-1]:
    if i % 2 == 0:
        SL = S[:(i//2+1)]
        SR = S[(i//2+1):i//2+1+i//2+1]
        
        if SL == SR:
            print((i//2+1)*2)
            exit()

Solution (Python):

s = input()
while True:
    s = s[0:-1]
    c = s[0:len(s)//2]
    if s == c*2:
        print(len(s))
        exit()

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

while flag==0:
  s.pop()
  if len(s)%2!=0:
    pass
  else:
    if "".join(s[:int(len(s)/2)]) == "".join(s[int(len(s)/2):]):
      flag=1
print(len(s))

Solution (Python):
s = input()
i = 0
x = 0
while len(s) != 0 and x == 0:
    s = s[:-1]
    if s[:int(len(s) / 2)] == s[int(len(s) / 2):]:
        x = 1
print(len(s))

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

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

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

Solution (Python):

import sys
INF = float("inf")


def solve(S: str):

    while True:
        S = S[:-2]
        if S[:len(S)//2] == S[len(S)//2:]:
            break
    print(len(S))
    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)


if __name__ == '__main__':
    main()

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

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

for i in range(N-2, 1, -2):
    if S[:i//2] == S[i//2: i]:
        print(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()
n = len(s)
for _ in range(n-1):
  s = s[:-1]
  p = len(s) // 2
  pre = s[:p]
  pst = s[p:]
  if pre == pst:
    print(2*p)
    break

Solution (Python):
s = input()

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

Solution (Python):
s = input()
 

if len(s) % 2:
    s = s[:-1]
else:
    s = s[:-2]
    
cnt = len(s)
    
    
while True:
    if s[:len(s) // 2] == s[len(s) // 2:]:
        break
    s = s[:-2]
    cnt -= 2
 
 
print(cnt)

Solution (Python):
s = input()

ans = 0
for i in range(len(s)-1, 1, -1):
    s_l = s[:i]
    if len(s_l)%2==1:
        continue
    else:
        if s_l[:len(s_l)//2] == s_l[len(s_l)//2:]:
            ans = max(ans, len(s_l))
if len(s)<= 3:
    print(1)
else:
    print(ans)

Solution (Python):
s = input()
s = s[:-1]
while True:
    if len(s) % 2 == 0:
        b = True
        for i in range(len(s) // 2):
            if s[i] != s[i + len(s) // 2]:
                b = False
        if b:
            print(len(s))
            exit()
    s = s[:-1]

Solution (Python):
s = input()

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

for i in range(1,len(s)):
    if f(s[0:len(s)-i]):
        print(len(s[0:len(s)-i]))
        break

Solution (Python):
s = input()
for i in range(len(s)-1):
    s = s[::-1]        
    s = s.replace(s[0],'',1)
    s = s[::-1] 
    a = s[0]
    for j in range(1,int(len(s)/2)+1):
        a += s[j]
        if a * (int(len(s)/len(a))) == s and (int(len(s)/len(a)) % 2 == 0 or s.count(s[0]) == len(s)):
            print(len(a * (int(len(s)/len(a)))))
            exit()

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

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

Solution (Python):

s=input()
L=len(s)
Ans=0
for k in range(2,L):
    i=L-k
    t=i+1
    A=0
    if t%2==0:
        for l in range(0,int(t/2)):
            if s[l]==s[l+int(t/2)]:
                A=A+1
            else:
                continue
    if A==int(t/2):
        Ans=i+1
        break

print(Ans)

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

Solution (Python):
S = input()

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

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

Solution (Python):
s = list(input())
s.pop(-1)
while len(s):
    ln = len(s)
    if ln%2 == 0:
        h = int(ln/2)
        lef = s[:h]
        rig = s[h:]
        if lef == rig:
            break
    s.pop(-1)
print(len(s))

Solution (Python):
s=input()
for i in range(1,len(s)):
	s=s[:len(s)-1]
	if len(s)%2==0 and \
	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):
s = input()
d = len(s)
for i in range(d):
    l = d - i
    s = s[:l]
    if l % 2 == 0 and i >= 1:
        if s[:l//2] == s[l//2:]:
            print(l)
            break

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

for i in range(len(s)):

    if len(s)%2==0 and i!=0:
        if s[:int(len(s)/2)]==s[int(len(s)/2):]:
            print(len(s))
            break
    s.pop(-1)

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

print(ans)

Solution (Python):
s = input()
l = len(s)
while True:
  l -= 2
  if s[:l//2] == s[l//2:l]:
    print(l)
    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):

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

Solution (Python):
import sys
s = input()
l = len(s)
del_len_max = l-2
del_len_min = 1 if l%2 == 1 else 2
if del_len_min == del_len_max:
    print(del_len_max)
    sys.exit()
for i in range(del_len_min, del_len_max+2, 2):
    before = s[0:(l-i)//2]
    after = s[(l-i)//2:l-i]
    if before == after:
        print(l-i)
        sys.exit()

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

Solution (Python):
s = input()
m = 0
for i in range((len(s)+1)//2):
  if s[:i] == s[i:2*i]:
    m = 2 * i
print(m)

Solution (Python):

import sys, math, fractions, itertools


def solve(S: str):
    for i in range(2, len(S), 2):
        s = S[:len(S)-i]
        if s[:len(s)//2] == s[len(s)//2:]:
            print(len(s))
            break
    return



def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

Solution (Python):

import sys
import copy
import collections
from bisect import bisect_left
from bisect import bisect_right
from collections import defaultdict
from heapq import heappop, heappush
import math
import itertools
 




 
def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
 
def main():
    s = input()
    
    leng = len(s)
    
    for i in range(leng-1, -1, -1):
        testtest = s[0:i]
        
        tmp = is_run(testtest)
        if tmp == True:
            print(len(testtest))
            sys.exit()
            
    print(0)
    
    
    
def is_run(s):
    leng = len(s)
    if leng % 2 == 1:
        return False
        
    bese = int(leng/2)
    tmp1 = s[:bese]
    tmp2 = s[bese:]
    
    
    
    if tmp1 == tmp2:
        return True
    else:
        return False
        
if __name__ == "__main__":
	main()

Solution (Python):
S = input()

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

Solution (Python):
s = list(input())
s = s[:len(s) - 1]
for i in range(len(s)):

    if s[:int(len(s)/2)] == s[int(len(s)/2):]:
        print(len(s))
        exit()
    else:
        s = s[:-1]

Solution (Python):


def main(S):
    while(True):
        S.pop()
        if(len(S)%2==1):
            continue
        elif(S[0:int(len(S)/2)]==S[int(len(S)/2):len(S)+1]):
            print(len(S))
            break       
        
if __name__ == '__main__':
    S = input()
    main(list(S))

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

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

s.pop(-1)

if len(s) % 2 == 1:
    s.pop(-1)

while s[:len(s)//2] != s[len(s)//2:]:
    s.pop(-1)
    s.pop(-1)

print(len(s))

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()
while True:
  s = s[:len(s) - 2]
  if s[:len(s) // 2] == s[len(s) // 2:]:
    break
print(len(s))

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

Solution (Python):
s = input()
ans = 0
for i in range(1,len(s)+1//2):
    if s[:i*2].count(s[:i]) == 2:
        if len(s[:i]) * 2 != len(s):
            ans = len(s[:i]) * 2
print(ans)

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

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

Solution (Python):
S = input()
s_list = list(S)
n = len(s_list)

for i in range(1,n):
    a = s_list[:-i]
    if len(a)%2 == 0:
        half = a[:int(len(a)/2)]
        
        if half + half == a:
            break
    
print(len(a))

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

for _ in range(len(s)):
  if len(s) % 2 == 0:  
    s.pop()
    s.pop()
    if s[:(len(s))//2] == s[len(s)// 2:]:
      print(len(s))
      break
  else:
    s.pop()
    if s[:(len(s))//2] == s[len(s)// 2:]:
      print(len(s))
      break

Solution (Python):

from collections import defaultdict
from collections import deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
import itertools
sys.setrecursionlimit(10**5)
stdin = sys.stdin
bisect_left = bisect.bisect_left
bisect_right = bisect.bisect_right
def LI(): return list(map(int, stdin.readline().split()))
def LF(): return list(map(float, stdin.readline().split()))
def LI_(): return list(map(lambda x: int(x)-1, stdin.readline().split()))
def II(): return int(stdin.readline())
def IF(): return float(stdin.readline())
def LS(): return list(map(list, stdin.readline().split()))
def S(): return list(stdin.readline().rstrip())
def IR(n): return [II() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def FR(n): return [IF() for _ in range(n)]
def LFR(n): return [LI() for _ in range(n)]
def LIR_(n): return [LI_() for _ in range(n)]
def SR(n): return [S() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
mod = 1000000007
inf = float('INF')


def A():
    a, b, c = LI()
    print(min(a+b,b+c,c+a))
    return


def B():
    def check(s):
        x = len(s)
        if x % 2:
            return False
        if s[:x // 2] == s[x // 2:]:
            return True
    s = S()
    for i in range(1,len(s)):
        if check(s[: - i]):
            print(len(s) - i)
            return


def C():
    return


def D():
    return


if __name__ == '__main__':
    B()

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

Solution (Python):
a = input()[:-1]
while True:
    if len(a) % 2 != 0:
        a = a[:-1]
    else:
        b = True
        for i in range(len(a) // 2):
            if a[i] != a[i + len(a) // 2]:
                b = not b
                a = a[:-1]
                break
        if b:
            print(len(a))
            exit()

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

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

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

Solution (Python):
a = input()
a = a[:len(a) - 1]
while True:
    if len(a) % 2 != 0:
        a = a[:len(a)-1]
    else:
        b = True
        for i in range(len(a) // 2):
            if a[i] != a[i + len(a) // 2]:
                b = not b
                break
        if b:
            print(len(a))
            exit()
        a = a[:len(a)-1]

Solution (Python):
s = input()

for i in reversed(range(2, len(s), 2)):
    m = i//2
    if s[:m] == s[m:i]:
        print(i)
        exit(0)

Solution (Python):



s = input()

ma = 0
for i in range(1,len(s)):
    if len(s[:-i]) % 2 != 0:
        continue
    else:
        n = len(s[:-i])
        n = n//2
        if s[:n] == s[n:-i]:
            ma = max(ma,len(s[:-i]))
print(ma)

Solution (Python):
S = str(input())
for i in range(len(S)-1,1,-1):
    tmp = S[0:i]
    if len(tmp)%2==0:
        flag = True
        for j in range(len(tmp)//2):
            if tmp[j]!=tmp[len(tmp)//2+j]:
                flag = False
                break
        if flag == True:
            print(len(tmp))
            break

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

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

Solution (Python):
s = input()
ans = 0
for i in range(1, len(s)//2):
    for j in range(i):
        if s[j] != s[j+i]:
            break
    else:
        ans = max(ans, i*2)
print(ans)

Solution (Python):
S = input()

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

Solution (Python):
import sys
s=list(input())
for i in range(len(s)//2):
    s=s[:len(s)-2]
    if s[:len(s)//2]==s[len(s)//2:]:
        print(len(s))
        sys.exit()

Solution (Python):
def main():
    S = input()
    for j in range(len(S) - 1, 0, -1):
        if len(S[:j]) % 2 == 1:
            continue
        i = len(S[:j]) // 2
        if S[:i] == S[i:j]:
            print(len(S[:j]))
            break


main()

Solution (Python):

S = input()
ori = len(S)

while True:

    if len(S)%2 == 0 and S[:len(S)//2] == S[len(S)//2:] and ori != len(S):

        
        print (len(S))
        break

    else:

        S = S[:len(S)-1]

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

def is_same(S):
    if len(S) % 2 != 0:
        return False
    mid = len(S) // 2
    S1 = S[:mid]
    S2 = S[mid:]
    for s1, s2 in zip(S1, S2):
        if s1 != s2:
            return False
    return True

for i in range(len(S)):
    S.pop()
    if is_same(S):
        print(len(S))
        break

Solution (Python):
S = input()

length = len(S)
for i in range(length-3, 0, -2):
    l = i // 2 + 1
    if S[:l] == S[l:l+l]:
        print(2*l)
        exit()

Solution (Python):

S = input()
flag = False
for i in range(len(S)):
    L = len(S)
    S = S[0 : L-1]   
    L = len(S)   
    if L % 2 == 0:
        short_L = int(L / 2)
        if S[0 : short_L] == S[short_L : L]:
            ans = L
            break
print(ans)

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

for i in range(len(a)):
  a.pop()
  if i%2==0:
    pass
  else:
    if a[0:int(len(a)/2)]==a[int(len(a)/2):len(a)]:
      print(len(a))
      break

Solution (Python):
import sys 
s=input()
s=s[:len(s)-1]
for i in range(len(s)):
    
    if len(s)%2==0 and (s[:int(len(s)/2)]==s[int(len(s)/2):]):
        print(len(s))
        sys.exit()
    else:
        s=s[:len(s)-1]

Solution (Python):
s = input()
lst = []
for i in range(len(s)):
    text = s[0:-i]
    
    if len(text)%2==0 and len(text)!=0:
        n = len(text)//2
        if text[:n] == text[n:]:
            lst.append(len(text))
print(max(lst))

Solution (Python):
S = input()

for i in range(len(S)-1,0,-1):
    if i%2 == 0:
        temp = S[:i]
        ch1 = temp[:i//2]
        ch2 = temp[i//2:]
        if ch1 == ch2:
            ans = len(temp)
            break

print(ans)

Solution (Python):



S = list(input())
A_li = []
B_li = []

for i in range(1, len(S) + 1):
    S_del = S[:-i]
    A_li = S_del[0:len(S_del) // 2]
    B_li = S_del[len(S_del) // 2::]
    if A_li == B_li:
        print(len(A_li) * 2)
        exit()

Solution (Python):


from collections import Counter

S = list(input())
A_li = []
B_li = []

for i in range(1, len(S) + 1):
    S_del = S[:-i]
    A_li = S_del[0:len(S_del) // 2]
    B_li = S_del[len(S_del) // 2::]
    if A_li == B_li:
        print(len(A_li) * 2)
        exit()

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

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

Solution (Python):
a = str(input())
a = a[:-2]
l = len(a)
while a[:l//2] != a[l//2:]:
    a = a[:-2]
    l = len(a)
print(len(a))

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

Solution (Python):


def main():
    data = input()
    ans = 0
    for i in range(1, len(data) // 2):
        a = data[:i]
        b = data[i : 2 * i]
        if a == b:
            ans = 2 * i

    print(ans)



if __name__ == '__main__':
    main()

Solution (Python):
from sys import stdin
S = (stdin.readline().rstrip())
ans = 0
for i in range(1,(len(S)//2)):
    if S[0:i] == S[i:2*i]:
        ans = 2*i
print(ans)

Solution (Python):
def ok(s):
    if s[:len(s)//2]==s[len(s)//2:]:
        return True
    return False
s = input()
for i in range(1,201):
    if ok(s[:len(s)-i]):
        print(len(s)-i)
        break

Solution (Python):
nl = lambda: list(map(int, input().split()))
sl = lambda: input().split()
n = lambda: int(input())
s = lambda: input()

S = s()

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

Solution (Python):
S = input()

for i in range(1,len(S)):
    L = len(S) - i*2
    s = ""
    for p in range(L//2):
        s += S[p]
    ss = ""
    for q in range(L//2):
        ss += S[p+1+q]

    if s == ss:
        print(L)
        exit()

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

Solution (Python):
S = input()
if len(S) % 2 == 1:
    S = S[:-1]
else:
    S = S[:-2]
N = len(S) // 2
while S[:N] != S[N:2*N]:
    N -= 1
print(2*N)

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

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

while ans:
    ans -= 2
    S = S[0:-2]
    if S[0:ans // 2] == S[ans // 2:]:
        break

print(ans)

Solution (Python):

import sys
sys.setrecursionlimit(300000)


def solve(S: str):
    n = len(S)
    for i in range(2, n, 2):
        mid = (n - i) // 2
        if S[:mid] == S[mid:n - i]:
            ret = n - i
            break
    print(ret)
    return


def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    S = next(tokens)  
    solve(S)

if __name__ == '__main__':
    main()

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

Solution (Python):
from collections import Counter
from collections import deque
from functools import reduce
from pprint import pprint
import bisect
import copy
import fractions
import itertools
import math
import queue
import random
import sys
import time
sys.setrecursionlimit(10**7)
INF = 10 ** 18
MOD = 10 ** 9 + 7
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def MI(): return map(int, sys.stdin.readline().split())
def II(): return int(sys.stdin.readline())
def IS(): return input()
def C(x): return Counter(x)
def GCD_LIST(numbers): return reduce(fractions.gcd, numbers)
def LCM_LIST(numbers): return reduce(LCM, numbers)
def LCM(m, n): return (m * n // fractions.gcd(m, n))


s = IS()
ans = -INF
for i in range(2, len(s), 2):
    if s[:i//2] == s[i//2:i]:
        ans = max(ans, i)
print(ans)

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

Solution (Python):
S = input()

def main():
    s = S
    l = len(s)
    while l:
        s = s[:l - 2]
        l = len(s)
        mid = l // 2
        if s[:mid] == s[mid:]:
            ans = l
            break
    print(ans)

if __name__ == '__main__':
    main()

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

Solution (Python):
S = input()

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

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

Solution (Python):
s = input()

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

Solution (Python):
def abc():
    s = list(input().rstrip())

    for i in range(len(s)):
        s.pop()
        if len(s) % 2:
            continue
        mid = len(s) // 2
        if s[0:mid] == s[mid:]:
            print(len(s))
            return


abc()

Solution (Python):
S = str(input())
N = len(S)
for i in range(N):
    S = S[:-2]
    if S[:len(S)//2] == S[len(S)//2:]:
        print (len(S))
        exit()

print ('error')

Solution (Python):
def check(s):
	if len(s) % 2 == 1:
		return False
	l = len(s)
	return s[:l // 2] == s[-l // 2:]

s = input()
for i in range(300):
	if check(s[:-i - 1]):
		print(len(s) - i - 1)
		break

Solution (Python):
import bisect
import os
from collections import Counter, deque
from fractions import gcd
from functools import lru_cache
from functools import reduce
import functools
import heapq
import itertools
import math
import numpy as np
import re
import sys
import string

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")

S = sys.stdin.readline().rstrip()
i = 2
while len(S) - i > 0:
    l = len(S) - i
    if S[:l // 2] == S[l // 2:l]:
        print(l)
        break
    i += 2

Solution (Python):
s = list(input())
b = [None]*len(s)
for i in range(len(b)):
  s.pop()
  if len(s) % 2 == 0:
    a = int(len(s) / 2)
    if s[:a] == s[a:]:
      print(len(s))
      break
    else:
      continue
  else:
    continue

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

Solution (Python):
S = input()

l = len(S) - 1

if l % 2:
    l -= 1

for i in range(l, 0, -2):
    if S[:i//2] == S[i//2:i]:
        break

print(i)

Solution (Python):
def is_even(S):
  L = len(S)
  left = S[:L//2]
  right = S[L//2:]
  return (left == right)

S = list(input())


answer = 0
while S:
  S.pop()
  if is_even(S):
    answer = len(S)
    break

print(answer)

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

while x>0:
    x=x-2
    s=s[:x]
    s1=s[:int(x/2)]
    s2=s[int(x/2):]

    if s1==s2:
        print(x)
        break

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

Solution (Python):

line = input()
length = len(line)

while length > 0:
    length = length - 2
    a = line[:int(length/2)]
    b = line[int(length/2):length]
    if a == b:
        break

print('{}'.format(length))

Solution (Python):
def is_gu(S):
    A = S[(len(S)/2):]
    B = S[:-1*(len(S)/2)]
    if A == B:
        return True
    else:
        return False

S = raw_input()

while len(S) > 1:
    S = S[:-1]
    if len(S) % 2 == 0 and is_gu(S):
        ans = len(S)
        break

print str(ans)

Solution (Python):
def main():
    S = input()  

    while True:
        S = S[:-1]
        if len(S) % 2 == 0:
            center = int(len(S)/2)
            if S[center:] == S[:center]:
                break

    print(len(S))


if __name__ == "__main__":
    main()

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

ans = 0

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

ans = len(check_str)
print(ans)

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


for i in range(len(s) // 2):
    f = True
    for j in range(len(s) // 2):
        if s[j] != s[len(s) // 2 + j]:
            f = False
    if f:
        break

    s = s[:-2]

print(len(s))