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):
S = input()
S = S[:int(len(S)-1)]
while True:
	
	if S[:int(len(S)/2)] == S[int(len(S)/2):]:
		print(int(len(S)))
		break
	else:
		S = S[:int(len(S)-1)]

Solution (Python):


a=input()
num=len(a)

num=num-2


for i in range(num,0,-1):
    a=a[:i]
    nums=int(i/2)
    s=a[:nums]
    if str(s)*2==str(a):
        print(len(a))
        break

Solution (Python):
s = input()
s = s[:len(s) - 1]
if len(s) % 2 != 0:
	s = s[:len(s) - 1]

while True:
	mid = int(len(s) / 2)
	if s[:mid] == s[mid:]:
		print(len(s))
		break
	else:
		s = s[:len(s) - 1]

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

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

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

while True:
  S.pop()

  if len(S) % 2 != 0:
    continue

  if S[:len(S) // 2] * 2 == S:
    break

print(len(S))

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

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

Solution (Python):
S = input()
T = list(S)
flag = 0

while flag == 0:
	del T[len(T)-1]
	del T[len(T)-1]
	if T[0:len(T)//2] == T[len(T)//2:len(T)]:
		flag = 1
		print(len(T))

Solution (Python):
s = input()

l = len(s)

for _ in range(200):
	s = s[:l-2]
	l = l - 2
	if s[:l//2] == s[l//2:]:
		print(l)
		break
	else:
		pass
else:
	print('no match')

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

for i in range(n, 0, -1):
    del S[len(S)-1]
    if len(S)%2 == 0:
        str1=""
        str2=""
        for j in range(int(len(S)/2)):
            str1 = str1 + S[j]
        for j in range(int(len(S)/2), len(S)):
            str2 = str2 + S[j]
        if str1 == str2:
            print(len(S))
            break

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

ans = len(S)
if len(S)%2 == 1 :
    S = S[0:-1]
    ans -= 1
    if S[0:ans//2] == S[ans//2:] :
        print(ans)
        sys.exit()

while len(S) > 0 :
    S = S[0:-2]
    ans -= 2
    if S[0:ans//2] == S[ans//2:] :
        print(ans)
        sys.exit()
else :
    print(ans)

Solution (Python):

def check_word(word):
    return word[:int(len(word)/2)] == word[int(len(word)/2):len(word)]

a = input()
count = 0
for i in range(1, len(a)):
    b = a[:-i]
    if check_word(b):
        count = len(b)
        break
print(count)

Solution (Python):


ss = raw_input()

while(True):
  ss = ss[:-1]
  leng = len(ss)
  former = ss[:leng/2]
  later  = ss[leng/2:]

  if former == later:
    leng = len(former) + len(later)
    break

print(leng)

Solution (Python):
def check(s):
    if len(s)%2 !=0:
        return False
    i=int(len(s)/2)
    s1=s[:i]
    s2=s[i:]
    return s1==s2

s = input()
while True:
    s = s[:len(s)-1]
    if check(s):
        print(len(s))
        break

Solution (Python):
from collections import deque
def main():
    s=deque(input())
    for i in range(0,len(s)):
        s.pop()
        if len(s)%2==1:
            continue
        else:
            if "".join(s)[0:len(s)//2]=="".join(s)[len(s)//2:len(s)]:
                print(len(s))
                break;
if __name__=='__main__':
    main()

Solution (Python):
moji = input()
def isEvenStr(moji):
	length = len(moji)
	if length % 2 == 1:
		return None
	else:
		firsthalf = moji[0:int(length/2)]
		latterhalf = moji[int(length/2):int(length)]
		return firsthalf == latterhalf

for i in range(len(moji)-1,0,-1):
	trimmed = moji[0:i]
	isEven = isEvenStr(trimmed)
	if isEven:
		print(i)
		break

Solution (Python):

import sys

S = raw_input()

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

if S[0:len(S)/2]==S[len(S)/2:]:
	S=S[0:len(S)-2]


cnt=len(S)
while cnt>1:
	
	S1=S[0:len(S)/2]
	S2=S[len(S)/2:]
	
	
	if S1==S2:
		print len(S)
		sys.exit()

	S=S[0:len(S)-2]
	cnt-=2

Solution (Python):

def main():
    msg = input()
    msg = msg[:-1]
    if len(msg) % 2 != 0:
        msg = msg[:-1]
    while len(msg) >= 2:
        before = msg[:int(len(msg) / 2)]
        after = msg[int(len(msg) / 2):]
        if before == after:
            print(len(msg))
            break
        msg = msg[:-2]


if __name__ == '__main__':
    main()

Solution (Python):


S=input()
Slen=len(S)

for idx in range(Slen-2,0-1,-2):
    T=S[0:idx]

    Tlen=len(T)
    
    for idy in range(0,Tlen//2,1):
        if T[idy] !=T[Tlen//2+idy]:
            break
    else:
        ans=idx
        break

print(ans)

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

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

Solution (Python):
def main():
    S = input().strip()
    for i in range(2, len(S), 2):
        part = S[:-i]
        p = len(part) // 2
        if part[:p] == part[p:]:
            print(p * 2)
            break

if __name__ == '__main__':
    main()

Solution (Python):
S = input()
S = S[:-1]
while True:
	if len(S) % 2 == 0:
		halflen = int(len(S) / 2)
		if S[:halflen] == S[halflen:]:
			print(len(S))
			break
	S = S[:-1]

Solution (Python):
s = raw_input()

length = len(s)

for i in reversed(range(length)):
    s = s[:-1]
    l = len(s)
    tempa = l / 2
    temp = s
    s1 = temp[:tempa]
    s2 = temp[tempa:]
    
    if s1 == s2:
        print l
        break

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

for i in range(1, s_length):
    if (s_length - i) % 2 != 0:
        continue
    mid = (s_length - i) // 2
    if s[:mid] == s[mid:s_length-i]:
        print(s_length - i)
        break
if s_length == 2:
    print(2)

Solution (Python):
s = raw_input()

def if_even(str):
    len_ = len(str)
    if len_ % 2:
        return 0
    str1 = str[:len_/2]
    str2 = str[len_/2:]
    if str1 == str2:
        
        return 1
    else:
        return 0

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

print len(s)

Solution (Python):

s = input()
sub = 0
for tmp in reversed(range(1,len(s)-2,2)):
    factor = s[0:tmp+1]
    sub += 2
    if factor[0:int(len(factor)/2)] == factor[int(len(factor)/2):len(factor)]:
        break
    else:
        pass
print(len(s)-sub)

Solution (Python):
import math
inf=float('inf')
s = input()
s=s[:-1]

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

N=len(s)

for i in range(N):
    h=int(len(s)/2)
    if (s[0:h-1]==s[h:-1]):

        print(len(s))
        quit()
    s=s[:-2]


quit()

Solution (Python):
import sys
def judge(s):
    if len(s)%2 == 1:
        return False
    half = len(s)//2
    for i in range(half):
        if s[i] != s[i+half]:
            return False
    return True

S = input()
for i in range(1,len(S)):
    if judge(S[:-i]):
        print(len(S[:-i]))
        sys.exit()
print(0)

Solution (Python):

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

while 1:
    l = int(len(s)/2)
    if (s[:l]==s[l:] ):
        print(l*2)
        break
    else:
        s = s[:-2]
    if ( len(s)==0 ):
        break

Solution (Python):
S=raw_input()

i=2
while(i<=len(S)-2):
    s=S[0:-1*i]
    if s[0:len(s)/2]==s[len(s)/2:]:
        print len(s)
        break
    i+=2

if len(S)==2:
    print 1

Solution (Python):
s = raw_input()
p = len(s) - 2
while(p>0):
    if s[0:p/2] == s[p/2:p]:
        break
    p -= 2
print p

Solution (Python):
def gu(s):
    l = len(s)
    if l%2 != 0:
        return 0
    else:
        ct = 0
        for i in range(l//2):
            if s[i] == s[i+(l//2)]:
                ct += 1
        if ct == (l/2):
            return 1
        else:
            return 0 





s = input()

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

print(len(s))

Solution (Python):

def main():
    s = raw_input()

    r = 0
    for i in range(2, len(s), 2):
        if s[:i/2] == s[i/2:i]:
            r = i

    print r


if __name__ == "__main__":
    main()

Solution (Python):
def equal(s1, s2):
    flag = True
    for i in range(len(s1)):
        if s1[i] != s2[i]:
            flag = False
            break
    return flag

S = list(input())

L = len(S)

ans = -1
for i in range(L):
    if (L - (i+1)) % 2 == 1:
        continue
    elif equal(S[:int((L - (i+1))/2)], S[int((L - (i+1))/2):(L - (i+1))]):
        ans = L - (i+1)
        break

print(ans)

Solution (Python):
def main():
    S = input()

    s = S
    while True:
        s = s[:-2]
        l = len(s) // 2
        if s[:l] == s[l:]:
            ans = len(s)
            break

    print(ans)

main()

Solution (Python):
s = input()

s = s[:-1]

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

while True:
    if s[:len(s) // 2] == s[len(s) // 2:]:
        print(len(s))
        break
    else:
        s = s[:-2]

Solution (Python):
S = input()
n = len(S)
for i in range(n):
	X = S[0:-2 * (i + 1)]
	x = S[0:int(n / 2) - i - 1]
	if X == x + x:
		count = i + 1
		break

print(n - count * 2)

Solution (Python):
def myfind(S):
	if (len(S) % 2 == 0):
		dv = len(S)//2
		f,e = S[:dv],S[dv:]
		if f == e: return True
	return False

if __name__ == '__main__':
	S = input()
	S = S[:-1]
	while not(myfind(S)): 
		S= S[:-1]
	print(len(S))

Solution (Python):
S = raw_input()

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

print(len(S))

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

Solution (Python):
str = input()
while True:
    str = str[:-2]
    n = len(str)
    if str[:int(n/2)] == str[int(n/2):]:
        print(n)
        break

Solution (Python):
s = input()

def r(s):
    l = len(s)
    if(l%2 == 1):
        return r(s[:-1])
    elif(s[:int(l/2)] == s[int(l/2):]):
        return len(s)
    else:
        return r(s[:-1])
print(r(s[:-1]))

Solution (Python):

s = str(input())
s = list(s)

a = 'x'
b = 'x'

for i in range(len(s)):
    s.pop()
    if len(s) % 2 == 0:
        a = s[:len(s)//2]
        b = s[len(s)//2:]
        if a == b:
            print(len(s))
            break

Solution (Python):

s = input()[:-1]

while True:
    l = len(s)
    if s[:l//2] == s[l//2:]:
        break
    s = s[:-1]

print(len(s))

Solution (Python):
s=list(raw_input())
while len(s) > 1:
    s.pop()
    left="".join(s[:len(s)/2])
    right="".join(s[len(s)/2:])
    if left == right:
        print len(left+right)
        exit()
print 0

Solution (Python):
def check(s):
    l = len(s)
    return True if s[:l / 2] == s[l / 2:] else False


S = raw_input()[:-1]
if len(S) % 2 != 0:
    S = S[:-1]
L = len(S)
for i in range(L):
    if check(S):
        break
    else:
        S = S[:-2]

print len(S)

Solution (Python):
s = list(str(input()))
s.pop(-1)
if len(s) % 2 != 0:
    s.pop(-1)
while True:
    if s[:len(s)//2] == s[len(s)//2:]:
        print(len(s))
        break
    s.pop(-1)

Solution (Python):
S = input()
N = len(S) - 2
if N % 2 == 1:
    N += 1
M = N // 2
while 1:
    if S[:M] == S[M:N]:
        print(N)
        exit()
    N -= 2
    M -= 1

Solution (Python):


s = raw_input()
flg = 1
slen = len(s)
while(flg):
    s = s[:slen-2]
    slen = len(s)
    m = slen/2
    if(s[:m]==s[m:]):
        print(2*m)
        flg = 0

Solution (Python):
import math


def f():
    a  = input()
    for i in range(1,len(a)):
        l = len(a) - i
        if l%2==1:
            continue
        d = l//2
        
        if a[:d] == a[d:-i]:
            print(d*2)
            return 
        
f()

Solution (Python):
S = raw_input()

S=S[:-2]
mid=len(S)/2
Sf=S[:mid]
Sl=S[mid:]

while Sf!=Sl:
  S=S[:-2]
  mid=len(S)/2
  Sf=S[:mid]
  Sl=S[mid:]

print(len(S))

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

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

cnt = 0

for _ in range(l):
    cnt += 1
    S = S[:-1]
    
    if len(S) % 2 == 1:
        continue
    f = True
    for i in range(len(S) // 2):
        if S[i] != S[len(S) // 2 + i]:
            f = False
            break
    if f:
        print(l - cnt)
        break

Solution (Python):
s = raw_input()

def is_rep(s0):
    l = len(s0)/2
    s1 = s0[:l]
    s2 = s0[l:]
    return s1 == s2

l = len(s)
while True:
    l -= 2
    if is_rep(s[:l]):
        break
print l

Solution (Python):


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

    sdd = sd[0:len(sd)//2]
    if sdd+sdd == sd:
        print(len(sd))
        break

Solution (Python):
s = input()

while True:
    s = s[:-2]
    n = len(s)
    w1 = s[:int(n / 2)]
    w2 = s[int(n / 2):]
    if w1 == w2:
        print(n)
        break

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

Solution (Python):

def get_ln_inputs():
    return input().split()


def get_ln_int_inputs():
    return list(map(int, get_ln_inputs()))


def is_ev_st(s):
    l = len(s)
    if l % 2 == 1:
        return False
    l2 = int(l / 2)
    return s[:l2] == s[l2:]


def main():
    S = get_ln_inputs()[0][:-1]
    while not is_ev_st(S):
        S = S[:-1]
    print(len(S))


main()

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

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

Solution (Python):
a = raw_input()

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

Solution (Python):



from __future__ import division, print_function
import sys


def main():
    s = sys.stdin.readline().strip()
    while True:
        s = s[:-2]
        i = len(s) // 2
        a = s[:i]
        b = s[i:]
        if a == b:
            print(len(s))
            return


if __name__ == '__main__':
    main()