object Main extends App {
  val in = scala.io.Source.stdin.getLines.toSeq.map(_.split(' ').map(_.toInt)).head
  val A = in(0)
  val B = in(1)
  val C = in(2)
  //println(A, B, C)
  val c = Math.min(A+B+1, C)
  val b = B//Math.max(B, C)
  println(b+c)
}