import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;

public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //ArrayList<Integer> list;
        int a = sc.nextInt();
        int b = sc.nextInt();
        int count = 1;
        long sum = 0;

        if( a >= b ) {
            for(int i = 0 ; i < a ; i++){
                sum += b * count;
                count = count * 10;
            }
        }else{
            for(int i = 0; i < b  ; i++){
                sum += a * count;
                count = count * 10;
            }
        }

        System.out.println(sum);
        }
        
	} import java.util.*; util.* java import java.util.ArrayList; ArrayList java.util import java.util.Iterator; Iterator java.util import java.util.List; List java.util import java.util.Collections; Collections java.util public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //ArrayList<Integer> list;
        int a = sc.nextInt();
        int b = sc.nextInt();
        int count = 1;
        long sum = 0;

        if( a >= b ) {
            for(int i = 0 ; i < a ; i++){
                sum += b * count;
                count = count * 10;
            }
        }else{
            for(int i = 0; i < b  ; i++){
                sum += a * count;
                count = count * 10;
            }
        }

        System.out.println(sum);
        }
        
	} Main public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //ArrayList<Integer> list;
        int a = sc.nextInt();
        int b = sc.nextInt();
        int count = 1;
        long sum = 0;

        if( a >= b ) {
            for(int i = 0 ; i < a ; i++){
                sum += b * count;
                count = count * 10;
            }
        }else{
            for(int i = 0; i < b  ; i++){
                sum += a * count;
                count = count * 10;
            }
        }

        System.out.println(sum);
        } main {
        Scanner sc = new Scanner(System.in);
        //ArrayList<Integer> list;
        int a = sc.nextInt();
        int b = sc.nextInt();
        int count = 1;
        long sum = 0;

        if( a >= b ) {
            for(int i = 0 ; i < a ; i++){
                sum += b * count;
                count = count * 10;
            }
        }else{
            for(int i = 0; i < b  ; i++){
                sum += a * count;
                count = count * 10;
            }
        }

        System.out.println(sum);
        } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int count = 1; count 1 long sum = 0; sum 0 if( a >= b ) {
            for(int i = 0 ; i < a ; i++){
                sum += b * count;
                count = count * 10;
            }
        }else{
            for(int i = 0; i < b  ; i++){
                sum += a * count;
                count = count * 10;
            }
        } a >= b a b {
            for(int i = 0 ; i < a ; i++){
                sum += b * count;
                count = count * 10;
            }
        } for(int i = 0 ; i < a ; i++){
                sum += b * count;
                count = count * 10;
            } int i = 0 ; int i = 0 ; i 0 i < a i a i++ i++ i {
                sum += b * count;
                count = count * 10;
            } {
                sum += b * count;
                count = count * 10;
            } sum += b * count sum b * count b count count = count * 10 count count * 10 count 10 {
            for(int i = 0; i < b  ; i++){
                sum += a * count;
                count = count * 10;
            }
        } for(int i = 0; i < b  ; i++){
                sum += a * count;
                count = count * 10;
            } int i = 0; int i = 0; i 0 i < b i b i++ i++ i {
                sum += a * count;
                count = count * 10;
            } {
                sum += a * count;
                count = count * 10;
            } sum += a * count sum a * count a count count = count * 10 count count * 10 count 10 System.out.println(sum) System.out.println System.out System System.out sum String[] args args public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //ArrayList<Integer> list;
        int a = sc.nextInt();
        int b = sc.nextInt();
        int count = 1;
        long sum = 0;

        if( a >= b ) {
            for(int i = 0 ; i < a ; i++){
                sum += b * count;
                count = count * 10;
            }
        }else{
            for(int i = 0; i < b  ; i++){
                sum += a * count;
                count = count * 10;
            }
        }

        System.out.println(sum);
        }
        
	} public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //ArrayList<Integer> list;
        int a = sc.nextInt();
        int b = sc.nextInt();
        int count = 1;
        long sum = 0;

        if( a >= b ) {
            for(int i = 0 ; i < a ; i++){
                sum += b * count;
                count = count * 10;
            }
        }else{
            for(int i = 0; i < b  ; i++){
                sum += a * count;
                count = count * 10;
            }
        }

        System.out.println(sum);
        }
        
	} Main
import java.util.*;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.List;
import java.util.Collections;

public class Main {
	public static void main(String[] args){
        Scanner sc = new Scanner(System.in);
        //ArrayList<Integer> list;
        int a = sc.nextInt();
        int b = sc.nextInt();
        int count = 1;
        long sum = 0;

        if( a >= b ) {
            for(int i = 0 ; i < a ; i++){
                sum += b * count;
                count = count * 10;
            }
        }else{
            for(int i = 0; i < b  ; i++){
                sum += a * count;
                count = count * 10;
            }
        }

        System.out.println(sum);
        }
        
	}
