#import <stdio.h>
int main(){
    char s[250] = {'\0'};
    scanf("%s",s);
    unsigned long n = strlen(s);
    for(int i=n/2-1;i>=1;i--) {
        char a[250] = {'\0'};
        char b[250] = {'\0'};
        strncpy(a, s, i);
        strncpy(b, s+i, i);
        if(strcmp(a,b)==0){
            printf("%d",2*i);
            return 0;
        }
    }
}
