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):
a = input()
len_ans = len(a) - 2
for i in range(len_ans):
  if a[:len_ans // 2] == a[len_ans // 2:len_ans]:
    print(len_ans)
    break
  len_ans -= 2

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

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

Solution (Python):
S = input()

def f(x):
  l = len(x)//2
  for i in range(l):
    if x[i] != x[l+i]:
      return False
  else:
    return True

for i in range(2,len(S),2):
  if f(S[:-1*i]):
    print(len(S[:-1*i]))
    break

Solution (Python):
s=input()
def check(s):
    if len(s)%2!=0:
        return False
    if s[0:len(s)//2]==s[len(s)//2:len(s)]:
        return True
    else:
        return False
for i in range(len(s)):
    s=s[:-1]
    if check(s):
        print(len(s))
        break

Solution (Python):
s = input()

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

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

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

Solution (Python):



def main():

    result = ''

    for i in range(1, len(S)):
        s = S[0:len(S) - i]

        if len(s) % 2 == 0 and s[0:len(s)//2] == s[len(s)//2:]:
            result = len(s)
            break

    print(result)


if __name__ == '__main__':
    S = input()
    main()

Solution (Python):
s_origin = input()
s_copy = s_origin[:]
for _ in range(len(s_origin)):
    s_copy = s_copy[:-1]
    if len(s_copy)%2 == 1:
        continue
    else:
        s_left = s_copy[:int(len(s_copy)/2)]
        s_right = s_copy[int(len(s_copy)/2):]
        if s_left == s_right:
            print(len(s_copy))
            break

Solution (Python):
s_origin = input()
s_copy = s_origin[:]
for i in range(1,len(s_origin)+1):
    s_copy = s_copy[:-1]
    if len(s_copy)%2 == 1:
        continue
    else:
        s_left = s_copy[:int(len(s_copy)/2)]
        s_right = s_copy[int(len(s_copy)/2):]
        if s_left == s_right:
            print(len(s_copy))
            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)):
    if (s[:-i][:len(s[:-i]) // 2]) == (s[:-i][len(s[:-i]) // 2:]):
        print(len(s[:-i]))
        break

Solution (Python):
S=input()
T=S
while True:
  T = T[:-2]
  if T[:int(len(T)/2)]==T[int(len(T)/2):]:
    print(len(T))
    break
  else:
    continue

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

Solution (Python):
S = input()

for _ in range(0, len(S)//2):
    S = S[:-2]
    N = len(S)
    if S[:N//2] == S[N//2:]:
        break

print(N)

Solution (Python):
s = input()

for i in range(len(s)):
    tmp = s[:-(i+1)]
    if len(tmp)%2 == 1:
        continue

    c = len(tmp) // 2
    if tmp[:c] == tmp[c:]:
        print(len(tmp))
        exit()

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

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

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

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

Solution (Python):
S = [i for i in input()]
count=0
for s in range(len(S)):
    if s == 0:
       S = S[:len(S)-1]
       continue
    if "".join(S[:(len(S)//2)]) == "".join(S[(len(S)//2):]):
        count = len(S)
        break
    S = S[:len(S)-1]
print(count)

Solution (Python):
if __name__ == '__main__':
    s = input()
    n = len(s)
    ans = 0
    for i in range(1, (n + 1) // 2):
        if s[:i] == s[i: i + i]:
            ans = i * 2
    print(ans)

Solution (Python):
S = input()

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

print(ans)

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

Solution (Python):
def is_ok(s):
    n = len(s)
    for i in range(n//2):
        if s[i] != s[n//2 + i]:
            return False
    return True


def main():
    S = input()
    ans = len(S) - 2
    while not is_ok(S[:ans]):
        ans -= 2
    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
S = input()
n = len(S)
for i in range(1,n):
    if (n-i)%2 == 1:
        continue
    if S[0:int((n-i)/2)]==S[int((n-i)/2):n-i]:
        print(len(S[0:n-i]))
        exit()

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

Solution (Python):
S = input()

tmp = 0
for i in range(len(S)):
  S = S[:-1]
  if(S[:len(S)//2] == S[len(S)//2:]):
    tmp = max(tmp, len(S))
print(tmp)

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

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

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

Solution (Python):
""" AtCoder """

S = input()
S = S[:-1]
s_len = len(S)
for i in range(s_len):
    S = S[:-1]
    ans = len(S)
    if ans % 2 == 0:
        if S[:ans//2] == S[ans//2:]:
            print(ans)
            exit()

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

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

for i in range(len(S0)):
  if(i != 0):
   if(len(S)%2 == 0):
    index = int(len(S)/2)-1
    str1 = ''.join(S[:index+1])
    str2 = ''.join(S[index+1:])
    
    
    if(str1 == str2):
      print(len(str1)*2)
      break     
  S.pop(-1)

Solution (Python):

S = input()[:-1]
n = len(S)
for _ in range(n):
    flg = 1
    if n % 2 == 1:
        S = S[:-1]
        n -= 1
        continue
    for i in range(n // 2):
        if S[i] != S[n // 2 + i]:
            flg = 0
    if flg:
        print(n)
        break
    S = S[:-2]
    n -= 2

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

while len(S) > 0:
    S  = S[:len(S) // 2 * 2]
    S1 = S[:len(S)//2]
    S2 = S[ len(S)//2:]
    if S1 == S2:
        break
    S  = S[:-1]

print(len(S))

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

for i in range(1,n):
    s1, s2 = s[:n-i], s[n-i:(n-i)*2]
    if s1 == s2:
        print((n-i)*2)
        exit()

Solution (Python):
from statistics import mean, median,variance,stdev
import numpy as np
import sys
import math
import fractions
import itertools
import copy

def j(q):
    if q==1: print("Heisei")
    else:print("TBD")
    exit(0)


def ct(x,y):
    if (x>y):print("")
    elif (x<y): print("")
    else: print("")

def ip():
    return int(input())







a = input()                                  






l = len(a)
for i in range(l-1,-1,-1):
    e = a[:i]
    if len(a)%2 == 0:
        b = len(e)//2
        c = e[b:]
        d = e[:b]
        if c==d:
            print(b*2)
            exit(0)

Solution (Python):
s=list(input())
for i in range(len(s)):
    s.pop(-1)
    a=[]
    b=[]
    for i in range(len(s)//2):
        a.append(s[i])
        b.append(s[i+len(s)//2])
    if a==b:
        print(len(a)*2)
        break

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

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

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

Solution (Python):
s = input()

ans = 0

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

Solution (Python):
s = input()

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

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

Solution (Python):
import re;print(len(re.match(r'(.+)\1',input()[:-1]).group()))

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

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

Solution (Python):
s=input();print(max(i*(s[:i//2]==s[i//2:i])for i in range(len(s))))

Solution (Python):
s = input()

for i in range(1, len(s)):
    st = s[0:-i]
    mid = len(st)//2
    left = st[:mid]
    right = st[mid:]
    
    if left == right:
        print(len(st))
        break

Solution (Python):
s = input()

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

print(ans)

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

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

Solution (Python):
S = list(input())
S.pop(-1)
if len(S) % 2 == 1:
    S.pop(-1)

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

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

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

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

Solution (Python):
import math
s = input()
s = s[0:-2]
ans = 0
for i in range(len(s)):
    if not len(s)%2 == 0:
        s = s[0:-2]
        continue
    x  = math.floor(len(s)/2-1)
    if s[0:x] == s[x+1:-1]:
        ans = len(s)
        break
    s = s[0:-2]

print(ans)

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

Solution (Python):
S = input()

def check(s):
    a = len(s)//2
    s1 = s[:a]
    s2 = s[a:]
    if s1==s2:
        return 0
    else:
        return 1

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

while  True:
    ans = check(S)
    if ans==0:
        print(len(S))
        break;
    else:
        S = S[:-2]

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

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):
S = input()

S = S[:-2]

flg = True

while flg:
    flg = False
    x = 0
    for i in range(len(S) // 2):
        if S[x] != S[len(S) // 2 + x]:
            flg = True
            S = S[:-2]
            break
        x += 1

print(len(S))

Solution (Python):
s=list(input())
while(1):
    t=int(len(s)/2)
    if len(s)==1:
        print(s)
        break
    s.pop(-1)
    if s[:t]==s[t:]:
        print(len(s))
        break

Solution (Python):
s = input()
mmax = 0
n = len(s)
while(n>1):
  s = s[0:n-1]
  n = len(s)
  if n<2:
    break
  if s[0:int(n/2)]==s[int(n/2):n]:
    mmax = max(mmax, n)
print(mmax)

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

Solution (Python):
S = input()
S = '.'.join([S[i] for i in range(len(S) - 2)]).replace('.', '')
while True:
    former = '.'.join([S[i] for i in range(int(len(S) / 2))]).replace('.', '')
    latter = '.'.join([S[i] for i in range(int(len(S) / 2), len(S))]).replace('.', '')
    if former ==latter:
        print(len(former)*2)
        exit(0)
    else:
        S = '.'.join([S[i] for i in range(len(S) - 2)]).replace('.', '')

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

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

while len(S) >= 2:
    if S[0:len(S)/2] == S[len(S)/2:len(S)]:
        print len(S)
        break
    del S[-1]
    del S[-1]

Solution (Python):
S = input()

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

for i in range(2,len(S)):
    n = len(S) - i
    comp = S[0:n]
    if even_string(comp):
        print(len(comp))
        quit()

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

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

print(Ans)

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

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

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

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

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

Solution (Python):
s = input()

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

Solution (Python):
def func(s):
    a = s[:len(s) // 2]
    b = s[len(s) // 2:]
    if a == b:
        return True
    else:
        return False


def main():
    s = input()
    for i in range(1, len(s)):
        t = s[:-i]
        if func(t):
            print(len(t))
            return 


if __name__ == '__main__':
    main()

Solution (Python):
s = str(input())
i = 0
ans = 0
while 2*(i+1) < len(s):
  t = s[:(i+1)]
  if t * 2 == s[:(i+1)*2]:
    ans = 2*(i+1)
  i +=1
print(ans)

Solution (Python):
S = str(input())
S = S[:len(S)-1]
while True:
    if len(S) == 1:
        exit()
    m = len(S) // 2
    if S[0:m] == S[m:]:
        print(len(S))
        exit()
    else:
        S = S[:len(S)-1]

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

for i in range(len(s)):
    if len(s)%2 == 1:
        s = s[:len(s)-1]
        continue

    s1 = s[:int(len(s)/2)]
    s2 = s[int(len(s)/2):]
    if s1 == s2:
        print(len(s))
        exit()

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

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

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

Solution (Python):
s = input()

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

Solution (Python):
s = list(input())
while True:
    del s[len(s)-1]
    if len(s)%2==0:
        index=0
        while index < len(s)//2:
            if s[index] == s[len(s)//2+index]:
                index+=1
            else:
                break
        if index == len(s)//2:
            print(len(s))
            break

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

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

print(2*ans)

Solution (Python):

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

Solution (Python):
import sys

def isEven(s):
  half = len(s) // 2
  if (s[:half] == s[half:]):
    return True
  else:
    return False
st = input()
tail = 0
if (len(st) % 2 == 0):
  tail = len(st) - 2
else:
  tail = len(st) - 1
while(tail >= 0):
  if (isEven(st[:tail]) == True):
    print(tail)
    sys.exit()
  else:
    tail -= 2

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

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

Solution (Python):
S = input().strip()

i  = 1
while len(S) >=1:
    S = S[:-(2 * i)]
    if S[(len(S) // 2):] == S[:(len(S) // 2)]:
        print(len(S))
        exit()

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

Solution (Python):
s = input()
ans =0
for j in range(0,(len(s)//2)):
 judge = s[0:j]
 judge2 = s[j:2*j]
 if judge == judge2:
  ans = max(ans,j*2)
print(ans)

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

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

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

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

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

Solution (Python):
S = input()
i = 1
while True:
    tmp = (len(S) - i)//2
    if S[:tmp] == S[tmp:-1*i]:
        print(tmp*2)
        break
    else:
        i+=1

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

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

Solution (Python):
str_s = input()

while len(str_s) > 0:
    str_s = str_s[:-1]
    if len(str_s) % 2 == 0:
        spliter = int(len(str_s) / 2)

        if str_s[:spliter] == str_s[spliter:]:
            print(len(str_s))
            exit(0)

Solution (Python):
S=list(input())
l=len(S)
Ans=0
for i in range(l-1):
    del S[-1]
    if len(S)%2==0:
        for j in range(len(S)//2):
            flag=True
            for k in range(len(S)//2):
                if S[k]!=S[k+len(S)//2]:
                    flag=False
            if flag==True and Ans<len(S):
                Ans=len(S)
print(Ans)

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

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

Solution (Python):
s = input()


for i in range(len(s)):
    ans = s[:min(len(s), -(i+1))]
    if(len(ans)%2==1):
        continue
    else:
        mid = int(len(ans)/2)
        if(mid>=0):
            if(ans[:mid]==ans[mid:]):
                print(mid*2)
                break

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

Solution (Python):
import sys
stdin = sys.stdin
 
sys.setrecursionlimit(10**5) 
 
def li(): return map(int, stdin.readline().split())
def li_(): return map(lambda x: int(x)-1, stdin.readline().split())
def lf(): return map(float, stdin.readline().split())
def ls(): return stdin.readline().split()
def ns(): return stdin.readline().rstrip()
def lc(): return list(ns())
def ni(): return int(stdin.readline())
def nf(): return float(stdin.readline())

s = ns()
n = len(s)

ans = 0

for i in range(1,n//2):
    first = s[:i]
    second = s[i:2*i]
    
    if first == second:
        ans = 2*i
        
print(ans)

Solution (Python):
s = input()
while 1:
    s = s[:-2]
    l = len(s)//2
    if s[:l]==s[l:]:
        print(2*l)
        exit()

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


abc066_b()

Solution (Python):
S = input()

i = 0
leng = len(S)

while 1:
    i += 1
    if S[:leng//2 - i] == S[leng//2 - i:leng - i * 2]:
        print((leng//2 - i) * 2)
        break

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

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

Solution (Python):
S = input()

result = 0

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

print(result)

Solution (Python):
S = input()

while True:
    S = S[:-1]
    cent = int(len(S) / 2)
    S_1 = S[:cent]
    S_2 = S[cent:]
    if S_1 == S_2:
        print(len(S))
        break

Solution (Python):
S = input()
l = list(S)
s = int(len(S))
res=""
for i in range(2,s,2):
    str=S[:-i]
    m = int(len(str)/2)
    p = str[:m]
    q = str[m:]
    if p==q:
        res = str
        print(len(res))
        break

Solution (Python):

a = input()
l = len(a) -1
k=0
if l%2!=0 :
    l -=1

for i in range(l//2):
    if a[0:l//2] == a[l//2:l]:
        k = l
        break
    l -=2
print(k)

Solution (Python):



def main():
    """Function."""
    s = str(input())

    max_len = 0
    for i in range((len(s)-1)//2):
        if s[:i+1] * 2 == s[:(i+1)*2]:
            max_len = (i + 1) * 2

    print(max_len)


if __name__ == "__main__":
    main()

Solution (Python):
def is_ss(s):
    l = len(s)
    return l % 2 == 0 and s[:l//2] == s[l//2:]


def main():
    s = input()[:-1]
    while not is_ss(s):
        s = s[:-1]
    print(len(s))


if __name__ == '__main__':
    main()

Solution (Python):
S=input()

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

Solution (Python):
s=input()

ans=""
for i in range(1,len(s)):
    str=s[:-1*i]
    if len(str)%2==0 and str[:int(len(str)/2)]==str[int(len(str)/2):]:
        ans=str
        break
print(len(ans))

Solution (Python):
s = input()


for i in reversed(range(len(s))):
    if 2 * i < len(s):
        
        if s[:i] == s[i:2 * i]:
            print(2*i)
            exit()

Solution (Python):
S = input()

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

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

Solution (Python):
S = input()
S = S[:-1]
S_list = list(S)
s = ''
for i in S_list:
  s+=i
  if s*2 in S:
    ans = s*2
print(len(ans))

Solution (Python):
def is_even_str(s) :
    s1 = s[0:int(len(s)/2)]
    s2 = s[int(len(s)/2):]
    return (s1 == s2) 


S = input()
while len(S) > 0 :
    S =S[:-2]
    if (is_even_str(S)) :
        print(len(S))
        break

Solution (Python):
S = input().strip()
n = len(S)

for i in range(int(n/2)-1):
    S = S[:-2]
    for j in range(int(len(S)/2)):
        if S[j] != S[j+int(len(S)/2)]:
            break
    else:
        print(len(S))
        quit()

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

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

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

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

Solution (Python):
line=input()
org=len(line)
rem=1
if len(line) % 2 == 1:
    line = line[0:len(line)-1]
else:
    line = line[0:len(line)-2]
    rem+=1
l=len(line)
while l >= 0:
    flg=0
    for i in range(0,int(l/2)):
        if line[i] != line[i+int(l/2)]:
            flg=1
            break
    if flg==0:
        print(str(org-rem))
        break
    l-=2
    rem+=2

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

Solution (Python):

S = input()
L = len(S)
print(next(L - i for i in range(2,L,2) if S[:((L-i)//2)]==S[((L-i)//2):L-i]))

Solution (Python):

S = input()
L = len(S)

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

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

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

Solution (Python):
S = input()
if len(S)%2 == 0:
  c = 2
else:
  c = 1
flag = False
T = S[0:(len(S)-c)//2]
U = S[(len(S)-c)//2:(len(S)-c)]
while flag == False:
  if T == U:
    flag = True
    break
  else:
    c += 2
    T = S[0:(len(S)-c)//2]
    U = S[(len(S)-c)//2:(len(S)-c)]
print(len(S)-c)

Solution (Python):
S = input()


def is_ss(t):
    if len(t) % 2 or t[:len(t)//2] != t[len(t)//2:]:
        return False
    else:
        return True


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

Solution (Python):
S = input()
for i in range(1, len(S)):
    l = len(S) - i
    if l%2:
        continue
    l = int(l/2)
    a = S[:l]
    b = S[l:l*2]
    if a == b:
        print(l*2)
        break

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

Solution (Python):



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

    for _ in range(len(s) // 2):
        middle = len(s)//2
        if s[:middle] == s[middle:]:
            print(len(s))
            exit()
        s = s[:-2]


if __name__ == '__main__':
    solve()

Solution (Python):
s = input()

for i in range(2,len(s),2):
    p_ans = s[:-i]
    half = len(p_ans)//2

    if p_ans[:half] == p_ans[half:]:
        print(len(p_ans))
        break

Solution (Python):
s = input()
ans=1

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

Solution (Python):
s = input()

for i in range(2, len(s) , 2):
    new_s = s[0:-i:]

    if new_s[0:len(new_s)//2:] == new_s[len(new_s)//2::]:
        print(len(new_s))
        break

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

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

while a:
  if a[:int(len(a)/2)] == a[int(len(a)/2):]:
    print(len(a))
    break
  else:
    a.pop()
    a.pop()

Solution (Python):
a = list(input())
ans = "f"
while ans != "t":
    del a[len(a)-1]
    if len(a) % 2 == 0:
        if a[0:len(a) // 2] == a[len(a) // 2:len(a)]:
            print(len(a))
            ans = "t"

Solution (Python):
S = input().rstrip()

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

n = 0
while True:
    n = len(S)
    mid = int(n / 2)
    if S[:mid] == S[mid:n]:
        break

    S = S[:n - 2]


print(n)

Solution (Python):
S = input()
str = list(S)
n = len(str)
for i in range(n):
  str.pop(-1)
  if len(str)%2 == 1:
    pass
  else:
    x = len(str)/2
    X = int(x)
    str1 = str[:X]
    str2 = str[X:]
    if str1 == str2:
      break
y = len(str1)*2
print(y)

Solution (Python):
s = input()
n = (len(s) - 1) // 2

for i in reversed(range(1, n + 1)):
  if s[:i] == s[i:2*i]:
    print(2 * i)
    break

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

Solution (Python):
S = input()
def judge(s):
    if len(s) % 2 == 0:
        if s[:(len(s)//2)] == s[len(s)//2:]:
            return True
        else:
            return False
    else:
        return False
ans = 0
for i in range(len(S)):
    if judge(S[:i]):
        ans = i
print(ans)

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

while True:
        s = s[0:length-2]
        length -= 2
        if s[0:int(length/2)] == s[int(length/2):length]:
                print(length)
                break

Solution (Python):
S = list(input())
for i in range(int(len(S)/2)):
  S.pop(-1)
  S.pop(-1)
  S_1 = S[:int(len(S)/2)]
  S_2 = S[int(len(S)/2):]
  if S_1 == S_2:
    print(2*len(S_1))
    break

Solution (Python):



s=input()
n=len(s)-([2,1][len(s)%2])
s=s[:n]
while 1:
    if (s[(n//2):n]==s[:(n//2)]):
        print(n)
        exit()
    n-=2
    s=s[:n]

Solution (Python):
s = list(input())[:-1]

while len(s) >= 2:
    if s[:len(s)//2] == s[len(s)//2:]:
        print(len(s))
        exit()
    else:
        s.pop()

Solution (Python):
S = list(input())
N = len(S)
for i in range(N):
	n = N - i - 1	
	if n % 2 == 0:	
		h = n // 2	
		if S[:h]==S[h:n]:
			ans = S[:h]+S[h:n]
			break

print(len(ans))