a,b,c = gets.split(" ").map(&:to_i)
ans = 0
onaka = 0

for i in 0..a+b+c do
    if onaka == 0
        if c >0
            c -= 1
            ans +=1
            onaka = 1
        elsif b > 0
            b -= 1
            ans += 1
        else
            break
        end
    else
        if b > 0 
            b -= 1
            ans += 1
            onaka = 0
        elsif a > 0
            a -= 1
            onaka = 0
        else
            break
        end
    end
end
puts ans