object Main extends App {
  import scala.io.StdIn._
  val Array(a,b) = readLine().split(" ").map(_.toInt)
  val aString = Array.fill[String](b)(a.toString).mkString("")
  val bString = Array.fill[String](a)(b.toString).mkString("")
  println(List(aString,bString).min)
}