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.



Sample input:
abaababaab


Sample output:
6

Submission status: Accepted

Solution code:
s=list(input())
while 1:
  s.pop()
  s.pop()
  if s[:len(s)//2]==s[len(s)//2:]:
    print(len(s))
    exit()

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
s = input()
ans = 0
for i in range(1, len(s)):
    t = s[:-i]
    len_t = len(t)
    if len_t%2 == 0:
        if t[:int(len_t/2)] == t[int(len_t/2):]:
            ans = len_t
            break
print(ans)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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]

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
""" 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()

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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:])
    #print(str1)
    #print(str2)
    if(str1 == str2):
      print(len(str1)*2)
      break     
  S.pop(-1)

Submission status: Accepted

Solution code:
# coding: utf-8
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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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())


#n = ip()                              #入力整数1つ
#n,k= (int(i) for i in input().split())      #入力整数横2つ
#n,x,y = (int(i) for i in input().split())    #入力整数横3つ
#n,a,b,c= (int(i) for i in input().split())  #入力整数横4つ
#a = [int(i) for i in input().split()]        #入力整数配列
a = input()                                  #入力文字列
#a = input().split()                          #入力文字配列
#n = ip()                      #入力セット(整数改行あり)(1/2)
#a=[ip() for i in range(n)]    #入力セット(整数改行あり)(2/2)

#jの変数はしようできないので注意
#全足しにsum変数使用はsum関数使用できないので注意
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)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

ans = 0

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
s = input()

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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:]

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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]

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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('.', '')

Submission status: Accepted

Solution code:
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]

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
s = input()

for i in range(1,len(s)//2+1-(1-(len(s)%2))): #iは偶文字列の片割れの長さ
    if s[0:i] == s[i:2*i]:
        ans = 2*i
print(ans)

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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]

Submission status: Accepted

Solution code:
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]

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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')

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
# ABC 066
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)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
s=input()
ans=0
for i in range(len(s)//2):
  if s[:i]==s[i:2*i]:
    ans=2*i
print(ans)
#コピペです。

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
#B ss
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)

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-


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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
s = input()

# s[0:i+1] == s[i+1:2*(i+1)]
for i in reversed(range(len(s))):
    if 2 * i < len(s):
        # print("{} {}".format(s[:i], s[i:2 * i]))
        if s[:i] == s[i:2 * i]:
            print(2*i)
            exit()

Submission status: Accepted

Solution code:
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)

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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))

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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()

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
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

Submission status: Accepted

Solution code:
# coding: utf-8
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]))

Submission status: Accepted

Solution code:
# coding: utf-8
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

Submission status: Accepted

Solution code:
s = list(input())

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

Submission status: Accepted

Solution code:
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)