      PROGRAM abc152b
      IMPLICIT NONE
      integer(16) :: a,b,mi,ma,i,ans = 0
      read*,a,b
      ma = min( a,b )
      mi = max( a,b )
      
      do i = 1,mi
        ans = ans + ma*10**(i-1)
      end do
      
      print*,ans
      
      
      
      
      
      
      END PROGRAM