'use strict'

const main = input => {
	const args = input.split('\n')[0].split(' ')
	let a = parseInt(args[0], 10)
	let b = parseInt(args[1], 10)
	let c = parseInt(args[2], 10)
	let t1 = false 
	let cnt = 0

	while (true) {
		if (t1) {
			if (b > 0) {
				b--
				t1 = false
				cnt++
			} else if (a > 0) {
				a--
				t1 = false
			} else {
				break
			}
		} else {
			if (c > 0) {
				c--
				t1 = true
				cnt++
			} else if (b > 0) {
				b--
				cnt++
			} else {
				break
			}
		}
	}

	console.log(cnt)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8'))
