def resolve():

    s = eval(input())

    l = len(s)

    for i in range(2, l, 2):

        test = s[0:(l-i)]

        t = len(test)

        if test[0:(t//2)] == test[(t//2):t]:

            print((len(test)))

            exit()

resolve()
def resolve():

    s = eval(input())

    for i in range(2, len(s), 2):

        test = s[:len(s)-i]

        if test[:len(test)//2] == test[len(test)//2:]:

            print((len(test)))

            exit()



resolve()
def resolve():
    s = eval(input())
    l = len(s)
    for i in range(2, l, 2):
        test = s[0 : (l - i)]
        t = len(test)
        if test[0 : (t // 2)] == test[(t // 2) : t]:
            print((len(test)))
            exit()


resolve()

def resolve():
    s = eval(input())
    for i in range(2, len(s), 2):
        test = s[: len(s) - i]
        if test[: len(test) // 2] == test[len(test) // 2 :]:
            print((len(test)))
            exit()


resolve()

-    l = len(s) -    for i in range(2, l, 2): -        test = s[0 : (l - i)] -        t = len(test) -        if test[0 : (t // 2)] == test[(t // 2) : t]: +    for i in range(2, len(s), 2): +        test = s[: len(s) - i] +        if test[: len(test) // 2] == test[len(test) // 2 :]: