
fun main(args:Array<String>){
    var (a,b,c) = readLine()!!.split(" ").map { it.toLong() }

    var bc = Math.min(b,c)
    c -=bc
    var ac = Math.min(c,a)
    c -= ac
    c = if(c>0) 1 else 0

    println(b+bc+ac +c)




}