import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = Math.max(a,b);
        int d = 0;
        for(int i=0;i<c;i++){d+=Math.min(a,b)*Math.pow(10,i);}
          System.out.println(d);                                
    }
} import java.util.*; util.* java public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = Math.max(a,b);
        int d = 0;
        for(int i=0;i<c;i++){d+=Math.min(a,b)*Math.pow(10,i);}
          System.out.println(d);                                
    }
} Main public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = Math.max(a,b);
        int d = 0;
        for(int i=0;i<c;i++){d+=Math.min(a,b)*Math.pow(10,i);}
          System.out.println(d);                                
    } main {
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = Math.max(a,b);
        int d = 0;
        for(int i=0;i<c;i++){d+=Math.min(a,b)*Math.pow(10,i);}
          System.out.println(d);                                
    } 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 c = Math.max(a,b); c Math.max(a,b) Math.max Math a b int d = 0; d 0 for(int i=0;i<c;i++){d+=Math.min(a,b)*Math.pow(10,i);} int i=0; int i=0; i 0 i<c i c i++ i++ i {d+=Math.min(a,b)*Math.pow(10,i);} {d+=Math.min(a,b)*Math.pow(10,i);} d+=Math.min(a,b)*Math.pow(10,i) d Math.min(a,b)*Math.pow(10,i) Math.min(a,b) Math.min Math a b Math.pow(10,i) Math.pow Math 10 i System.out.println(d) System.out.println System.out System System.out d String[] args args public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = Math.max(a,b);
        int d = 0;
        for(int i=0;i<c;i++){d+=Math.min(a,b)*Math.pow(10,i);}
          System.out.println(d);                                
    }
} public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = Math.max(a,b);
        int d = 0;
        for(int i=0;i<c;i++){d+=Math.min(a,b)*Math.pow(10,i);}
          System.out.println(d);                                
    }
} Main
import java.util.*;
public class Main {
	public static void main(String[] args){
		Scanner sc = new Scanner(System.in);
		int a = sc.nextInt();
        int b = sc.nextInt();
		int c = Math.max(a,b);
        int d = 0;
        for(int i=0;i<c;i++){d+=Math.min(a,b)*Math.pow(10,i);}
          System.out.println(d);                                
    }
}
