program main
	implicit none
	integer i, counter
	character(200) S
	read(*, *) S
	counter = 0
	do i = 2, len_trim(S)-2
		if(S(1:(len_trim(S)-i)/2) == S(1+(len_trim(S)-i)/2:len_trim(S)-i)) then
			write(*, *) len_trim(S)-i
			counter = 1
			exit
		end if
	end do
	if(counter == 0) then
		write(*, *) 1
	end if
end program main