import java.util.Scanner

object Main extends App {

  val sc = new Scanner(System.in)

  val month = sc.nextInt()
  val date = sc.nextInt()
  var counter = 0
  (1 to month).foreach( m =>
    (1 to date).foreach( d =>
      if (m == d) {
        counter = counter +1
      }
    )
  )
  println(counter)
}
