function main(input){
    input = input.split(' ');
    inputA=parseInt(input[0]);
    inputB=parseInt(input[1]);
    count=1;
    inputIa=0;
    for(i=0;i<inputB;i++){
        inputIa = inputIa+inputA*count;
        count=count*10;
    }
    count=1;
    inputIb=0;
    for(i=0;i<inputA;i++){
        inputIb = inputIb+inputB*count;
        count=count*10;
    }

    if(inputIa<=inputIb){
        out = inputIb;
    }
    else if(inputIa>inputIb){
        out = inputIa;
    }

    console.log(out);
}

main(require("fs").readFileSync("/dev/stdin", "utf8"));