import java.util.Scanner

object Main extends App {
  val sc = new Scanner(System.in)
  val n = sc.nextInt()
  val a = sc.nextInt()
  val b = sc.nextInt()

  def balls(ball: Char = 'b', times: Int = a): Stream[Char] = {
    val nextBall =
      if (times == 1)
        if (ball == 'b') 'r' else 'b'
      else ball
    val nextTimes =
      if (times == 1)
        if (ball == 'b') b else a
      else times - 1
    ball #:: balls(nextBall, nextTimes)
  }

  val ballCounts = balls().take(n).toList.mkString.count(_ == 'b')

  println(ballCounts)
}
