a,b,c = gets.chomp.split(" ").map(&:to_i)
gedokuzai = a + b
tasty_cookie = 0
for i in 0..gedokuzai
  if c <= 0
    tasty_cookie += b #残りのbを足す
    break
  end

  c -=1 #毒を食べる
  tasty_cookie += 1
  if a  > 0
    a -= 1
    next
  end
  if b > 0
    b -= 1
    tasty_cookie += 1
    next
  end
  break
end
print("#{tasty_cookie}\n")