import sys

stdin = sys.stdin



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

def li_(): return [int(x)-1 for x in stdin.readline().split()]

def lf(): return list(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()



ans = 0

for n in range(len(s)//2-1,-1,-1):

    if s[:n] == s[n:2*n]:

        ans = n

        break

        

print((2*ans))
import sys

stdin = sys.stdin

 

sys.setrecursionlimit(10**5) 

 

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

def li_(): return [int(x)-1 for x in stdin.readline().split()]

def lf(): return list(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)
import sys

stdin = sys.stdin


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


def li_():
    return [int(x) - 1 for x in stdin.readline().split()]


def lf():
    return list(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()
ans = 0
for n in range(len(s) // 2 - 1, -1, -1):
    if s[:n] == s[n : 2 * n]:
        ans = n
        break
print((2 * ans))

import sys

stdin = sys.stdin
sys.setrecursionlimit(10**5)


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


def li_():
    return [int(x) - 1 for x in stdin.readline().split()]


def lf():
    return list(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)

+sys.setrecursionlimit(10**5) +n = len(s) -for n in range(len(s) // 2 - 1, -1, -1): -    if s[:n] == s[n : 2 * n]: -        ans = n -        break -print((2 * ans)) +for i in range(1, n // 2): +    first = s[:i] +    second = s[i : 2 * i] +    if first == second: +        ans = 2 * i +print(ans)