def agc_030_a
    a,b,c = gets.chomp.split(/\s/).map{|x| x.to_i}

    t = 0

    if b >= c
        b -= c
        t += c * 2
        c = 0
    else
        c -= b
        t += b * 2
        b = 0
    end

    if c > 0
        if a >= c
            a -= c
            t += c
            c = 0
        else
            c -= a
            t += a
            a = 0
        end
    end

    if a > 0 && b > 0
        if a >= b
            a -= b
            t += b
            b = 0
        else
            b -= a
            t += a
            a = 0
        end
    end

    t += 1 if c > 0

    puts t
end

agc_030_a