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-----
abaababaab

-----Sample Output-----
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.

Difficulty: introductory

Starter code:

Solutions:
S = input()
x = len(S)

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

S = input()
N = len(S)

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

n = input()
num = len(n)-2
for i in range(num,0,-2):
  f = int(i/2)
  if n[:f]==n[f:i]:
    print(i)
    break

s = input()
num = len(s)-2
for i in range(num,0,-2):
  f = int(i / 2)
  if s[:f] == s[f:i]:
    print(i)
    break

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

import sys
S = input()
ans = 0


for i in range(len(S)//2):
    S = S[:len(S)-2]
    #print(S)
    count = 0
    for j in range(len(S)//2):
        if S[j] != S[len(S)//2+j]:
            break
        else:
            count += 1
    if count == len(S)//2:
        print((len(S)))
        return



import sys
import copy
import math
import itertools
import numpy as np
S=input()
for i in range(1,len(S)):
    l = len(S[0:len(S)-i]) 
    if l%2==0:
        if S[0:len(S)-i] == S[0:int(l/2)]+S[0:int(l/2)]:
            print(l)
            return

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

# -*- coding: utf-8 -*-
import numpy as np
import sys
from collections import deque
from collections import defaultdict
import heapq
import collections
import itertools
import bisect
from scipy.special import comb
import copy
sys.setrecursionlimit(10**6)


def zz():
    return list(map(int, sys.stdin.readline().split()))


def z():
    return int(sys.stdin.readline())


def S():
    return sys.stdin.readline()[:-1]


def C(line):
    return [sys.stdin.readline() for _ in range(line)]


def check(s):
    if (s[len(s) // 2:] == s[:len(s) // 2]):
        print((len(s)))
        return


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


S = list(input())

for _ in range(len(S)-1):
    del S[-1]
    if S[:int(len(S)/2)] == S[int(len(S)/2):]:
        break
        
print(len(S))

s = str(input())
sl = list(s)
ans = 0
del sl[-1]
for i in range(1,len(sl)):
  if(len(sl)%2==0):
    if(sl[:len(sl)//2]==sl[len(sl)//2:]):
      ans = len(sl)
      break
  del sl[-1] 
print(ans)
  



S=input()

for i in range(1, len(S)):
  s=S[0:len(S)-i]
  #print(s)
  if len(s)%2==1:
    continue
  #print('pre', s[0:int(len(s)/2)+1])
  #print('follow', s[int(len(s)/2):len(s)])
  if s[0:int(len(s)/2)]==s[int(len(s)/2):len(s)]:
    print(len(S)-i)
    break

S = list(input())

S.pop(-1)
if (len(S)) % 2 == 1:
  S.pop(-1)
while True:
  count = 0
  for i in range(int(len(S)/2)):
    if S[i] == S[int(len(S)/2) + i]:
      count += 1
      continue
    else:
      break
  if count == len(S)/2:
    print(len(S))
    break
  S.pop(-1)
  S.pop(-1)

s=input()
for i in range(len(s)-1, 0, -1):
    L = len(s[:i])
    if L % 2 == 0 and s[:L//2] == s[L//2:L]:
        print(i)
        return


s = input()
n = len(s)

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

s = str(input())


#print(kind)
for i in range(2, len(s), 2):
    line = s[:len(s)-i]
    #print(line)
    if line[:len(line)//2] == line[len(line)//2:]:
        ans = len(line)    
        break


print(ans)


s=str(input())
flag=0
for i in range(1,len(s)):
  s=s[:len(s)-2]
  for j in range(len(s)//2):
    if s[j]!=s[len(s)//2+j]:
      flag=1
      break
  if flag==0:
    print(len(s))
    return
  else:
    flag=0
    continue

s = input ()
while len(s) != 0:
  s = s[:-2]
  le = round (len(s)/2)
  if s[:le] == s[le:len(s)]:
    print (len(s))
    break

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

S = list(str(input()))
del S[-1]
del S[-1]

def ss(string):
    if len(string)&2==1:
        retrun(False)
    else:
        for i in range(len(string)//2):
            if S[i]!=S[len(string)//2+i]:
                return(False)
        return(True)

while True:
    if ss(S):
        print((len(S)))
        return
    else:
        del S[-1]
        del S[-1]


s = input()

def judge(S):
   if (len(S) % 2 == 0) and (S[:len(S) // 2] == S[(-1) * len(S) // 2:]):
      return True
   else:
      return False

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

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

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

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

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

s = input()
s = s[:len(s) - 2]

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

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

import sys, re
from math import ceil, floor, sqrt, pi, factorial, gcd
from copy import deepcopy
from collections import Counter, deque
from heapq import heapify, heappop, heappush
from itertools import accumulate, product, combinations, combinations_with_replacement
from bisect import bisect, bisect_left, bisect_right
from functools import reduce
from decimal import Decimal, getcontext
# input = sys.stdin.readline 
def i_input(): return int(input())
def i_map(): return list(map(int, input().split()))
def i_list(): return list(i_map())
def i_row(N): return [i_input() for _ in range(N)]
def i_row_list(N): return [i_list() for _ in range(N)]
def s_input(): return input()
def s_map(): return input().split()
def s_list(): return list(s_map())
def s_row(N): return [s_input for _ in range(N)]
def s_row_str(N): return [s_list() for _ in range(N)]
def s_row_list(N): return [list(s_input()) for _ in range(N)]
def lcm(a, b): return a * b // gcd(a, b)
sys.setrecursionlimit(10 ** 6)
INF = float('inf')
MOD = 10 ** 9 + 7
num_list = []
str_list = []

def main():
    s = input()
    if len(s) % 2 == 0:
        i = len(s) - 2
    else:
        i = len(s) - 1
    while True:
        if s[:int(i/2)] ==  s[int(i/2):i]:
            print(i)
            break
        i -= 2
        


def __starting_point():
    main()

__starting_point()

S = input()
for i in range(2, len(S)+2, 2):
    split = int(len(S[:-i])/2)
    if S[:split] == S[split:-i]:
        print((len(S[:-i])))
        return


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

#!/usr/local/bin/python3
# https://atcoder.jp/contests/abc066/tasks/abc066_b

S = list(input())[:-2]

def check(S):
    half = len(S) // 2
    if S[:half] == S[half:]:
        return True
    else:
        return False

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


S=list(input())


import sys
for i in range(len(S)):
    del S[-1]
    for j in range(len(S)):
        if len(S)%2==0:
            if S[0:len(S)//2]==S[len(S)//2:len(S)]:
                print(len(S))
                return
else:
    print(0)

#4 B - ss
S = list(input())

def judge(A):
    if len(A)%2 == 0:
        if A[:len(A)//2] == A[len(A)//2:]:
            return True
    return False

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

N = str(input())

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

print(len(N))

#!/usr/bin/env python3
S = input()

n = 0
for i in range(200):
    n += 2
    s = S[:len(S) - n]

    if s[: len(s) // 2] == s[len(s) // 2:]:
        print((len(s)))
        return


S = input()
N = len(S)

if N%2 == 1:
    M = N-1
else:
    M = N-2

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


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

s = input()
for i in range(1000):
    s = s[:-2]
    tnp = 0
    for j in range(len(s)//2):
        if (s[j]!=s[len(s)//2+j]):
            tnp += 1
    if (tnp==0):
        print(len(s))
        break

s = input()
res = 0

for i in range(len(s)):
  if i % 2 != 0:
    pass
  else:
    if s[:i//2] == s[i//2:i]:
      res = i
print(res)

s = input()

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


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


S = input()
for i in range(2, len(S), 2):
    end = len(S)-i
    center = int(end/2)
    if S[:center] == S[center:end]:
        print(end)
        break

S = input()
test = ""
tmp = 0
for i in range(1, len(S)):
    j = -1 * i
    test = S[:j]
    tmp = len(test) // 2
    if len(test) % 2 == 0 and test[0:tmp] == test[tmp:]:
        print(len(test))
        return

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

s = list(input())

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

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

S = input()

l = len(S)

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


n = input()[:-1]
while n[:len(n)//2] != n[len(n)//2:]:
  n = n[:-1]
print(len(n))

s = str(input())
while True:
    s = s[:-1]
    n = len(s) // 2
    if s[:n] == s[n:]:
        print(2 * n)
        return

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

def answer(s: str) -> int:
    if len(s) % 2 == 1:
        s += ' '

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

        if s[:middle] == s[middle:]:
            return l


def main():
    s = input()
    print(answer(s))


def __starting_point():
    main()
__starting_point()

S = input()

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

    if gumozi[0:len(gumozi)//2] == gumozi[(len(gumozi)//2):len(gumozi)]:
        print((len(gumozi)))
        return
print((0))


s = input()
n = len(s)

ans = n

for i in range(n):
    s = s[0:-1]
    ans -= 1

    if s[0:ans//2] == s[ans//2:]:
        break

print(ans)

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

s = input()
n = len(s)
import sys
for i in range(1,n//2):
    if s[:(n-2*i)//2]==s[(n-2*i)//2:n-2*i]:
        print(n-2*i)
        return

s=input()
temp = 1 if len(s) % 2 != 0 else 2
for i in range(temp, len(s), 2):
  moji = s[:len(s)-i]
  #print(moji[:len(moji)//2], moji[len(moji)//2:])
  if moji[:len(moji)//2] == moji[len(moji)//2:]:
    print((len(moji)))
    break


s = input()
num = len(s)

tar_index = len(s) - 1
count = 0

while (count < num):
    tar = s[:tar_index]
    tar_num = len(tar)
    # 文字数が奇数の時は、偶文字列にはならない。
    if (tar_num % 2 == 0):
        half = int(tar_num / 2)

        if (tar[:half] == tar[half:]):
            print((int(2 * len(tar[:half]))))
            return
        else:
            pass

    else:
        pass

    tar_index -= 1
    count += 1


import sys

input = sys.stdin.readline

def main():
    ans = 0
    s = input().rstrip('\n')
    ls = len(s)
    for i in range(1,ls):
        if (ls - i)%2 != 0:
            continue
        temps = s[:-i]
        if temps[:(ls-i)//2] == temps[(ls-i)//2:]:
            ans = ls - i 
            break

    print(ans)

def __starting_point():
    main()
__starting_point()

s = list(input())
for i in range(len(s)):
  s.pop(-1)
  if len(s)%2 == 1:
    continue
  if s[:len(s)//2] == s[len(s)//2:]:
    print(len(s))
    break

# B - ss
def main():
    s = list(input())

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


if __name__ ==  "__main__":
    main()

from sys import stdin, stdout # only need for big input
import numpy as np

def solve():
    s = input()
    n = len(s)
    ans = 1 
    for end in range(2,n,2):
        even = True
        for i in range(end//2):
            if s[i] != s[end//2 + i]:
                even = False
                break
        if even:
            ans = end
    print(ans)

def main():
    solve()


def __starting_point():
    main()
__starting_point()

S = str(input())
for i in range(1, int(len(S) / 2)):
    T = S[0: len(S) - 2 * i]
    clear = 0
    m = int(len(T) / 2)
    for j in range(m):
        if T[j] == T[m + j]:
            clear += 1
    if clear == m:
        print((len(T)))
        break


n = input()[:-1]
while n[:len(n)//2] != n[len(n)//2:]:
  n = n[:-1]
print((len(n)))


s = input()
for i in range(len(s)):
    ss = s[:-2-i]
    size = len(ss)
    if size%2==0 and ss[:size//2] == ss[size//2:]:
        print(size)
        return

S = str(input())
S = S[:-2]

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

  else:
    S = S[:-2]

s = list(input())
ans = 0
if len(s)%2==0:
    s = s[:-2]
else:
    s.pop(-1)

while len(s)>0:
    if s[0:int(len(s)/2)]==s[int(len(s)/2):len(s)]:
        ans = len(s)
        break
    else:
        s = s[:-2]
        
print(ans)

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

S = input()

odd = len(S) % 2
little = odd + (1-odd)*2
start = len(S)-1-little

ans = 0
for i in range(start,0,-2):
  half = (i+1)//2
  a = S[:half]
  b = S[half:half*2]
  if a == b:
    #print(a,b)
    ans = len(a)*2
    break
    
    
print(ans)

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

s = str(input())
ans = 0

for i in range(len(s)-1,0,-1):
    if i%2!=0:
        continue

    if s[0:i//2] == s[i//2:i] and i > ans :
        ans = i
    elif i <= ans:
        break

if len(s)==2:
    ans = 2
print(ans)

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))
    break

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

import sys
S = input()

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


# 愚直
s = input()
for i in range(2, len(s), 2):
    t = s[:len(s) - i]
    u = t[:len(t) // 2]
    if u + u == t:
        print(len(t))
        return

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

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

S = list(input())

for i in range(2, len(S)):
    miniS = S[0:-i]
    if len(miniS) % 2 == 0:
        front = ''.join(miniS[0:len(miniS)//2])
        back = ''.join(miniS[len(miniS)//2:len(miniS)])
        if front == back:
            print(len(miniS))
            return

import sys
S = input()

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


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

class mystr:
    def __init__(self,string):
        self.value = string

    def isEven(self):
        l = len(self.value)
        if (not l & 1) and self.value[:l//2] == self.value[l//2:]:
            return True
        else:
            return False

    def pop(self):
        l = len(self.value)
        self.value = self.value[:l-1]

s = mystr(input())
l = len(s.value)
for i in reversed(list(range(l))):
    s.pop()
    if s.isEven():
        print(i)
        break


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

S: str = input()

for i in range(len(S)-2, 0, -2):
    words: str = S[:i]
    half: int = len(words)//2

    if words[:half] == words[half:]:
        print((half * 2))
        break



S = input()
if len(S) %2 == 0 :
    S = S[:-2]
else :
    S =S[:-1]
while(1) :
    l = int(len(S)/2)

    if S[:l] == S[l:] :
        print(len(S))
        return
    S = S[:-2]

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

s = input()[:-1]
while True:
    n = len(s)
    if n%2 == 0:
        if s[:n//2] == s[n//2:]:
            print(n)
            return
    s = s[:-1]


S=input()
S2=S[:(len(S))//2]
while len(S)>=2:
    S=S[:-2]
    S2=S2[:-1]
    if S==S2+S2:
        print((len(S)))
        return


s = input()

def check(a):
  if len(a) % 2 == 1:
    return False
  if a[:len(a)//2] == a[len(a)//2:]:
    return True
  return False

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

#n = int(input())
#a, b = map(int,input().split())
#l = list(map(int,input().split()))
#l = [list(map(int,input().split())) for i in range(n)]
s = input()
n = len(s)


def isrepeat(s):
    res = False
    n = len(s)
    if s[0:n//2]+s[0:n//2] == s:
        res = True
    return res


for delnum in range(1, n):
    if (n-delnum) % 2 == 0:
        if isrepeat(s[0:n-delnum]):
            ans = n-delnum
            break
print(ans)


s = [i for i in input()]
s = s[:-1]
while s[:len(s)//2] != s[len(s)//2:]:
  s = s[:-1]
print((len(s)))


s=input()
while s:
  s=s[:-1]
  n=len(s)//2
  if s[:n]==s[n:]:
    print(2*n)
    break

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

ans = 0
for i in range(1, lenS, 2):
    idx = -i
    _S = S[:idx]
    #print(_S)
    idx = len(_S)//2
    if _S[:idx] == _S[idx:]:
        ans = len(_S)
        break
print(ans)

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

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

def f():
    s = list(input())
    for i in range(len(s)):
        s.pop(-1)
        s.pop(-1)
        c = 0
        for j in range(len(s)//2):
            if s[j] == s[len(s)//2 + j]:
                c += 1
                if c == len(s)//2:
                    return len(s)
            else:
                break
print(f())

S = input()
for i in range(len(S)):
    S = S[0:len(S)-1]
    if(len(S) % 2 == 0):
        if((S[0:(len(S)//2)]) == (S[(len(S)//2):len(S)+1])):
            print(str(len(S)))
            return

s=input()
n=len(s)

for i in range(1,n):
  if (n-i)%2==0:
    m=(n-i)//2
    if s[0:m]==s[m:n-i]:
      print(n-i)
      return

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

s = input()
for i in range(1, 101):
    s_del_end = s[:len(s) - i]
    len_s_del_end = len(s_del_end)
    if s_del_end[:len_s_del_end // 2] == s_del_end[len_s_del_end // 2:] and len_s_del_end % 2 == 0:
        print(len_s_del_end)
        return


s=input()
s = list(s)
del s[-1]
del s[-1]
while True:
    if s[:len(s)//2] == s[len(s)//2:]:
        print(len(s))
        return
    else:
        del s[-1]
        del s[-1]

s = input()

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

while len(s) >= 2:
    half = len(s) // 2
    if s[:half] == s[half:]:
        print(len(s))
        break
    s = s[2:]

def judge(Str, Len):
  if Str[:Len//2] == Str[Len//2:]:
    return True
  else:
    return False

S = input()
L = len(S)
i = 2 - (L % 2)
S = S[:-i]
L -= i
if judge(S, L):
  print(L)
else:
  while not judge(S, L):
    S = S[:-2]
    L -= 2
  print(L)