/******************************************************************************

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.

*******************************************************************************/
import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
	    Scanner s=new Scanner (System.in);
	  int n=s.nextInt();
	  int m=s.nextInt();
	  int r=0;
	  int t=0;
	  if(n<=m)
	  {
	      r=n;
	      for(int i=1; i<m; i++ ){
	          
	          t=n*10;
	          n=t+r;
	          
	      }
	      System.out.println(""+n);
	          
	  }
	  else
	  {
	      r=m;
	      for(int i=1; i<n; i++ ){
	          
	          t=m*10;
	          m=t+r;
	          
	      }
	      System.out.println(""+m);
	          
	  }
	  
	  
	  
	  
	}
} import java.util.Scanner; Scanner java.util public class Main
{
	public static void main(String[] args) {
	    Scanner s=new Scanner (System.in);
	  int n=s.nextInt();
	  int m=s.nextInt();
	  int r=0;
	  int t=0;
	  if(n<=m)
	  {
	      r=n;
	      for(int i=1; i<m; i++ ){
	          
	          t=n*10;
	          n=t+r;
	          
	      }
	      System.out.println(""+n);
	          
	  }
	  else
	  {
	      r=m;
	      for(int i=1; i<n; i++ ){
	          
	          t=m*10;
	          m=t+r;
	          
	      }
	      System.out.println(""+m);
	          
	  }
	  
	  
	  
	  
	}
} Main public static void main(String[] args) {
	    Scanner s=new Scanner (System.in);
	  int n=s.nextInt();
	  int m=s.nextInt();
	  int r=0;
	  int t=0;
	  if(n<=m)
	  {
	      r=n;
	      for(int i=1; i<m; i++ ){
	          
	          t=n*10;
	          n=t+r;
	          
	      }
	      System.out.println(""+n);
	          
	  }
	  else
	  {
	      r=m;
	      for(int i=1; i<n; i++ ){
	          
	          t=m*10;
	          m=t+r;
	          
	      }
	      System.out.println(""+m);
	          
	  }
	  
	  
	  
	  
	} main {
	    Scanner s=new Scanner (System.in);
	  int n=s.nextInt();
	  int m=s.nextInt();
	  int r=0;
	  int t=0;
	  if(n<=m)
	  {
	      r=n;
	      for(int i=1; i<m; i++ ){
	          
	          t=n*10;
	          n=t+r;
	          
	      }
	      System.out.println(""+n);
	          
	  }
	  else
	  {
	      r=m;
	      for(int i=1; i<n; i++ ){
	          
	          t=m*10;
	          m=t+r;
	          
	      }
	      System.out.println(""+m);
	          
	  }
	  
	  
	  
	  
	} Scanner s=new Scanner (System.in); s new Scanner (System.in) int n=s.nextInt(); n s.nextInt() s.nextInt s int m=s.nextInt(); m s.nextInt() s.nextInt s int r=0; r 0 int t=0; t 0 if(n<=m)
	  {
	      r=n;
	      for(int i=1; i<m; i++ ){
	          
	          t=n*10;
	          n=t+r;
	          
	      }
	      System.out.println(""+n);
	          
	  }
	  else
	  {
	      r=m;
	      for(int i=1; i<n; i++ ){
	          
	          t=m*10;
	          m=t+r;
	          
	      }
	      System.out.println(""+m);
	          
	  } n<=m n m {
	      r=n;
	      for(int i=1; i<m; i++ ){
	          
	          t=n*10;
	          n=t+r;
	          
	      }
	      System.out.println(""+n);
	          
	  } r=n r n for(int i=1; i<m; i++ ){
	          
	          t=n*10;
	          n=t+r;
	          
	      } int i=1; int i=1; i 1 i<m i m i++ i++ i {
	          
	          t=n*10;
	          n=t+r;
	          
	      } {
	          
	          t=n*10;
	          n=t+r;
	          
	      } t=n*10 t n*10 n 10 n=t+r n t+r t r System.out.println(""+n) System.out.println System.out System System.out ""+n "" n {
	      r=m;
	      for(int i=1; i<n; i++ ){
	          
	          t=m*10;
	          m=t+r;
	          
	      }
	      System.out.println(""+m);
	          
	  } r=m r m for(int i=1; i<n; i++ ){
	          
	          t=m*10;
	          m=t+r;
	          
	      } int i=1; int i=1; i 1 i<n i n i++ i++ i {
	          
	          t=m*10;
	          m=t+r;
	          
	      } {
	          
	          t=m*10;
	          m=t+r;
	          
	      } t=m*10 t m*10 m 10 m=t+r m t+r t r System.out.println(""+m) System.out.println System.out System System.out ""+m "" m String[] args args public class Main
{
	public static void main(String[] args) {
	    Scanner s=new Scanner (System.in);
	  int n=s.nextInt();
	  int m=s.nextInt();
	  int r=0;
	  int t=0;
	  if(n<=m)
	  {
	      r=n;
	      for(int i=1; i<m; i++ ){
	          
	          t=n*10;
	          n=t+r;
	          
	      }
	      System.out.println(""+n);
	          
	  }
	  else
	  {
	      r=m;
	      for(int i=1; i<n; i++ ){
	          
	          t=m*10;
	          m=t+r;
	          
	      }
	      System.out.println(""+m);
	          
	  }
	  
	  
	  
	  
	}
} public class Main
{
	public static void main(String[] args) {
	    Scanner s=new Scanner (System.in);
	  int n=s.nextInt();
	  int m=s.nextInt();
	  int r=0;
	  int t=0;
	  if(n<=m)
	  {
	      r=n;
	      for(int i=1; i<m; i++ ){
	          
	          t=n*10;
	          n=t+r;
	          
	      }
	      System.out.println(""+n);
	          
	  }
	  else
	  {
	      r=m;
	      for(int i=1; i<n; i++ ){
	          
	          t=m*10;
	          m=t+r;
	          
	      }
	      System.out.println(""+m);
	          
	  }
	  
	  
	  
	  
	}
} Main
/******************************************************************************

Welcome to GDB Online.
GDB online is an online compiler and debugger tool for C, C++, Python, Java, PHP, Ruby, Perl,
C#, VB, Swift, Pascal, Fortran, Haskell, Objective-C, Assembly, HTML, CSS, JS, SQLite, Prolog.
Code, Compile, Run and Debug online from anywhere in world.

*******************************************************************************/
import java.util.Scanner;
public class Main
{
	public static void main(String[] args) {
	    Scanner s=new Scanner (System.in);
	  int n=s.nextInt();
	  int m=s.nextInt();
	  int r=0;
	  int t=0;
	  if(n<=m)
	  {
	      r=n;
	      for(int i=1; i<m; i++ ){
	          
	          t=n*10;
	          n=t+r;
	          
	      }
	      System.out.println(""+n);
	          
	  }
	  else
	  {
	      r=m;
	      for(int i=1; i<n; i++ ){
	          
	          t=m*10;
	          m=t+r;
	          
	      }
	      System.out.println(""+m);
	          
	  }
	  
	  
	  
	  
	}
}
