program ComparingStrings

  implicit none

  integer a,b
  integer comeout
  integer i

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

  print '(i0)', comeout


end program
