import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ax = a, bx = b;
		for(int i = 1; i < b; i++){
			ax *= 10;
			ax += a;
		}

		for(int i = 1; i < a; i++){
			bx *= 10;
			bx += b;
		}
		
		System.out.println(ax >= bx ? ax : bx);
		
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ax = a, bx = b;
		for(int i = 1; i < b; i++){
			ax *= 10;
			ax += a;
		}

		for(int i = 1; i < a; i++){
			bx *= 10;
			bx += b;
		}
		
		System.out.println(ax >= bx ? ax : bx);
		
	}
} Main public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ax = a, bx = b;
		for(int i = 1; i < b; i++){
			ax *= 10;
			ax += a;
		}

		for(int i = 1; i < a; i++){
			bx *= 10;
			bx += b;
		}
		
		System.out.println(ax >= bx ? ax : bx);
		
	} main {

		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ax = a, bx = b;
		for(int i = 1; i < b; i++){
			ax *= 10;
			ax += a;
		}

		for(int i = 1; i < a; i++){
			bx *= 10;
			bx += b;
		}
		
		System.out.println(ax >= bx ? ax : bx);
		
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int ax = a ax a bx = b; bx b for(int i = 1; i < b; i++){
			ax *= 10;
			ax += a;
		} int i = 1; int i = 1; i 1 i < b i b i++ i++ i {
			ax *= 10;
			ax += a;
		} {
			ax *= 10;
			ax += a;
		} ax *= 10 ax 10 ax += a ax a for(int i = 1; i < a; i++){
			bx *= 10;
			bx += b;
		} int i = 1; int i = 1; i 1 i < a i a i++ i++ i {
			bx *= 10;
			bx += b;
		} {
			bx *= 10;
			bx += b;
		} bx *= 10 bx 10 bx += b bx b System.out.println(ax >= bx ? ax : bx) System.out.println System.out System System.out ax >= bx ? ax : bx ax >= bx ax bx ax bx String args[] args public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ax = a, bx = b;
		for(int i = 1; i < b; i++){
			ax *= 10;
			ax += a;
		}

		for(int i = 1; i < a; i++){
			bx *= 10;
			bx += b;
		}
		
		System.out.println(ax >= bx ? ax : bx);
		
	}
} public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ax = a, bx = b;
		for(int i = 1; i < b; i++){
			ax *= 10;
			ax += a;
		}

		for(int i = 1; i < a; i++){
			bx *= 10;
			bx += b;
		}
		
		System.out.println(ax >= bx ? ax : bx);
		
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String args[]){

		Scanner scan = new Scanner(System.in);
		
		int a = scan.nextInt();
		int b = scan.nextInt();
		
		int ax = a, bx = b;
		for(int i = 1; i < b; i++){
			ax *= 10;
			ax += a;
		}

		for(int i = 1; i < a; i++){
			bx *= 10;
			bx += b;
		}
		
		System.out.println(ax >= bx ? ax : bx);
		
	}
}
