program main
      implicit none
      integer :: a,b,ans,i

      read *, a, b

      ans = 0
      if ( a > b ) then
        do i = 1, a
          ans = ans + 10**(i-1)*b
        end do
      else
        do i = 1, b
          ans = ans + 10**(i-1)*a
        end do
      end if
      print *, ans

end program main
