A, B, C = gets.chomp.split.map(&:to_i)

# A .. bad  / heal
# B .. good / heal
# C .. good / poison

# we can take all B
# we can take all C if (A + B) + 1 > C (

if A + B + 1 <= C
  p B + (A + B + 1)
else # A+B+1 > C
  p B + C
end
