Let's call a string good if and only if it consists of only two types of letters — 'a' and 'b' and every two consecutive letters are distinct. For example "baba" and "aba" are good strings and "abb" is a bad string.

You have $a$ strings "a", $b$ strings "b" and $c$ strings "ab". You want to choose some subset of these strings and concatenate them in any arbitrarily order.

What is the length of the longest good string you can obtain this way?


-----Input-----

The first line contains three positive integers $a$, $b$, $c$ ($1 \leq a, b, c \leq 10^9$) — the number of strings "a", "b" and "ab" respectively.


-----Output-----

Print a single number — the maximum possible length of the good string you can obtain.


-----Examples-----
Input
1 1 1

Output
4

Input
2 1 2

Output
7

Input
3 5 2

Output
11

Input
2 2 1

Output
6

Input
1000000000 1000000000 1000000000

Output
4000000000



-----Note-----

In the first example the optimal string is "baba".

In the second example the optimal string is "abababa".

In the third example the optimal string is "bababababab".

In the fourth example the optimal string is "ababab".

Source: codeforces | Difficulty: EASY
Tags: Greedy algorithms


Solutions:
(a, b, c) = [int(s) for s in input().split(' ')]
answer = 2 * c + 2 * min(a, b)
if a != b:
	answer += 1
print(answer)


(s, o, n) = list(map(int, input().split()))
a = min(s, o)
if s == o:
	print(2 * n + s + o)
elif s > o or o > s:
	print(2 * n + a + a + 1)


(a, b, c) = map(int, input().split())
print(c * 2 + min(a + b, min(a, b) * 2 + 1))


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, copy, functools
import random
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
eps = 1.0 / 10 ** 10
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return list(map(int, sys.stdin.readline().split()))

def LLI():
	return [list(map(int, l.split())) for l in sys.stdin.readlines()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def LF():
	return [float(x) for x in sys.stdin.readline().split()]

def LS():
	return sys.stdin.readline().split()

def I():
	return int(sys.stdin.readline())

def F():
	return float(sys.stdin.readline())

def S():
	return input()

def pf(s):
	return print(s, flush=True)

def pe(s):
	return print(str(s), file=sys.stderr)

def main():
	(a, b, c) = LI()
	r = min(a, b) * 2
	if a != b:
		r += 1
	return r + c * 2
print(main())


l = list(map(int, input().split()))
a = l[0] + l[2]
b = l[1] + l[2]
if a == b or a == b + 1 or a == b - 1:
	print(a + b)
else:
	print(2 * min(a, b) + 1)


(a, b, c) = [int(x) for x in input().split(' ')]
if a == b:
	print(a + b + 2 * c)
else:
	(a, b) = [a, b] if a < b else [b, a]
	print(a * 2 + 1 + 2 * c)


(a, b, c) = map(int, input().split())
ans = min(a, b) + c
print(ans * 2 + int(max(a, b) != min(a, b)))


(a, b, c) = map(int, input().split())
if a == b and b == c:
	print(4 * a)
	exit()
if abs(a - b) == 0:
	print(a + b + 2 * c)
elif abs(a - b) == 1:
	print(a + b + c * 2)
else:
	n = min(a, b)
	m = n + 1
	print(m + n + 2 * c)


import re
import sys
import itertools as it
from functools import reduce

def nextInt():
	while True:
		line = input()
		tokens = re.split('\\s+', line)
		for token in tokens:
			if token != '':
				yield int(token)
(a, b, c) = map(int, input().split(' '))
if b > a:
	print(2 * a + 1 + 2 * c)
elif b == a:
	print(a + b + 2 * c)
else:
	print(2 * b + 1 + 2 * c)


(a, b, c) = map(int, input().split())
l = c * 2
mi = min(a, b)
ma = max(a, b)
l = l + mi * 2
if ma >= mi + 1:
	l = l + 1
print(l)


(a, b, c) = map(int, input().split())
r = int(a != b)
print(c * 2 + min(a, b) * 2 + r)


(a, b, c) = input().split()
(a, b, c) = (int(a), int(b), int(c))
if a > b:
	print(2 * (b + c) + 1)
elif a < b:
	print(2 * (a + c) + 1)
else:
	print(a + b + 2 * c)


(a, b, ab) = map(int, input().split())
ans = 2 * ab
if a == b:
	print(ans + 2 * a)
else:
	print(ans + 2 * min(a, b) + 1)


(a, b, c) = map(int, input().split())
x = min(a + 1, b)
y = min(a, b + 1)
print(x + y + c * 2)


(a, b, c) = [int(x) for x in input().split()]
print(2 * c + min(a, b) + min(max(a, b), min(a, b) + 1))


(a, b, ab) = [int(x) for x in input().split()]
length = 2 * ab
if a != b:
	length += 2 * min(a, b) + 1
elif a == b:
	length += a + b
print(length)


from sys import stdin

def input():
	return stdin.readline().strip()
(a, b, c) = list(map(int, input().split()))
print(2 * c + 2 * min(a, b) + (a - min(a, b) > 0 or b - min(a, b) > 0))


(x, y, z) = map(int, input().split())
ans = 2 * z
if x == y:
	print(ans + x + y)
else:
	print(2 * min(x, y) + ans + 1)


(a, b, both) = map(int, input().split())
l = 0
if a > b:
	l = min(a, b) * 2 + 1 + both * 2
elif a == b:
	l = a + b + both * 2
else:
	l = min(a, b) * 2 + 1 + both * 2
print(l)


z = input()
ass = z.split()
for i in range(0, 3):
	ass[i] = int(ass[i])
if ass[0] > ass[1] + 1:
	f1 = ass[1]
	f2 = ass[1] + 1
	f3 = ass[2] * 2
elif ass[1] > ass[0] + 1:
	f1 = ass[0] + 1
	f2 = ass[0]
	f3 = ass[2] * 2
else:
	f1 = ass[0]
	f2 = ass[1]
	f3 = ass[2] * 2
print(f1 + f2 + f3)


(a, b, c) = map(int, input().split())
s1 = a + c
s2 = b + c
if abs(s2 - s1) == 1 or s1 - s2 == 0:
	print(s1 + s2)
else:
	print(min(s1, s2) * 2 + 1)


(n, m, k) = map(int, input().split())
if m > n + 1:
	m = n + 1
elif n > m + 1:
	n = m + 1
print(n + m + 2 * k)


(a, b, c) = map(int, input().split())
res = 0
if a > b or b > a:
	res = min(a, b) * 2 + c * 2 + 1
elif a == b:
	res = a * 2 + c * 2
print(res)


(a, b, c) = map(int, input().split()[:3])
sumo = 0
if a != b:
	sumo = min(a, b) * 2 + 1 + 2 * c
else:
	sumo = a + b + 2 * c
print(sumo)


(a, b, c) = map(int, input().split())
result = c * 2 + min(a, b) * 2 + (1 if a != b else 0)
print(result)


(a, b, c) = list(map(int, input().split()))
single = min(a, b)
temp = max(a, b) - single
if temp == 0:
	ans = single * 2 + c * 2 + 0
else:
	ans = single * 2 + c * 2 + 1
print(ans)


s = [int(i) for i in input().split()]
(a, b, c) = (s[0], s[1], s[2])
total = 0
total += 2 * c
if a < b:
	total += 2 * a + 1
elif b < a:
	total += 2 * b + 1
else:
	total += 2 * a
print(total)


(a, b, c) = list(map(int, input().split()))
b -= 1
if a > b:
	if a - b > 1:
		print(c * 2 + b * 2 + 3)
	else:
		print(c * 2 + b * 2 + 2)
else:
	print(c * 2 + min(a, b) * 2 + 1)


inp = list(map(int, input().split()))
(a, b, c) = (inp[0], inp[1], inp[2])
if a >= b:
	if a - b <= 1:
		print(a + b + c + c)
	else:
		print(b + b + 1 + c + c)
elif b - a <= 1:
	print(a + b + c + c)
else:
	print(a + a + 1 + c + c)


(a, b, c) = map(int, input().split())
q = c * 2 + min(a, b) * 2
if a != b:
	q += 1
print(q)


(a, b, c) = map(int, input().split())
d = 0

def longest_str(a, b, c):
	if a == b:
		return c * 2 + a + b
	elif a < b:
		return c * 2 + a + (a + 1)
	elif a > b:
		return c * 2 + b + b + 1
	else:
		return 'error'
print(longest_str(a, b, c))


a = 'a'
b = 'b'
c = 'ab'
n = list(map(int, input().split()))
sum = 0
sum = n[2] * 2
if n[0] == n[1]:
	sum += n[0] + n[1]
else:
	sum += 2 * min(n[0], n[1]) + 1
print(sum)


def ii():
	return int(input())

def fi():
	return float(input())

def si():
	return input()

def mi():
	return map(int, input().split())

def li():
	return list(mi())
(a, b, c) = mi()
ans = c * 2 + 2 * min(a, b)
if a != b:
	ans += 1
print(ans)


(a, b, c) = (int(i) for i in input().split())
if b > a:
	print(2 * a + 1 + 2 * c)
elif a > b:
	print(2 * c + 2 * b + 1)
else:
	print(a + b + 2 * c)


def main():
	(a, b, c) = map(int, input().split())
	x = min(a, b)
	a -= x
	b -= x
	ans = 0
	if a > 0 or b > 0:
		ans += 1
	ans += 2 * c
	ans += 2 * x
	print(ans)
main()


import sys
(a, b, c) = map(int, sys.stdin.readline().split(' '))
if a == b:
	x = 0
else:
	x = 1
if a > b:
	a = b
print(2 * (c + a) + x)


(a, b, c) = map(int, input().split())
k = min(a, b)
g = max(a, b)
d = min(k + 1, g)
print(k + d + 2 * c)


(a, b, c) = map(int, input().split())
ans = 0
ans = 2 * c
m = min(a, b)
a -= m
b -= m
ans += 2 * m
if a >= 1 or b >= 1:
	ans += 1
print(ans)


args = [int(x) for x in input().split(' ')]
a = args[0]
b = args[1]
ab = args[2]
if a < b + 1 and b < a + 1:
	print(str(a + b + ab * 2))
else:
	print(min([a, b]) * 2 + 1 + ab * 2)


(a, b, c) = [int(x) for x in input().split()]
optional = 1 if a != b else 0
print(2 * c + 2 * min(a, b) + optional)


(a, b, c) = [int(i) for i in input().split()]
k = min(a, b)
a = a - k
b = b - k
if b > 0:
	cnt = 1
elif a > 0:
	cnt = 1
else:
	cnt = 0
cnt = cnt + k * 2 + c * 2
print(cnt)


(a, b, c) = map(int, input().split())
if abs(a - b):
	print(2 * c + 2 * min(b, a) + 1)
else:
	print(2 * c + 2 * min(b, a))


test = list(map(int, input().split(' ')))
a = test[0]
b = test[1]
c = test[2]
l = 0
if a == b:
	l = a + b + c * 2
elif a > b:
	l = 2 * (b + c) + 1
else:
	l = 2 * (a + c) + 1
print(l)


[a, b, c] = list(map(int, input().rstrip().split()))
mi = min(a, b)
res = 2 * c + 2 * mi + min(1, a - mi) + min(1, b - mi)
print(res)


(a, b, c) = map(int, input().split())
ans = 0
sub = min(a, b)
ans += 2 * sub
a -= sub
b -= sub
ans += 2 * c
if a > 0:
	ans += 1
if b > 0:
	ans += 1
print(ans)


import math

class Input:

	def readInt(self):
		return int(input())

	def readIntArray(self):
		return [int(x) for x in input().split(' ')]

	def readString(self):
		return input()

	def readStringArray(self):
		return input().split(' ')

	def readFloat(self):
		return float(input())

	def readFloatArray(self):
		return [float(x) for x in input().split(' ')]

def main():
	inp = Input()
	arr = inp.readIntArray()
	if arr[0] == arr[1]:
		ans = arr[0] * 2 + arr[2] * 2
	else:
		ans = min(arr[0], arr[1]) * 2 + 1 + arr[2] * 2
	print(ans)
	return
main()


(a, b, ab) = map(int, input().split())
c = min(a, b)
s = 0
if a > b:
	s = 2 * ab + 2 * c + 1
elif a < b:
	s = 1 + 2 * ab + 2 * c
else:
	s = 2 * c + 2 * ab
print(s)


(a, b, c) = map(int, input().split())
k = 1
if a == b:
	k = 0
print(2 * c + 2 * min(a, b) + k)


(a, b, c) = map(int, input().split())
if max(a, b) > min(a, b) + 1:
	abc = 2 * min(a, b) + 1
else:
	abc = a + b
print(2 * c + abc)


(a, b, c) = [int(s) for s in input().split()]
r = 0
r += 2 * c
c -= c
d = min(a, b)
r += 2 * d
a -= d
b -= d
r += min(a, 1) + min(b, 1)
print(r)


dat = [int(t) for t in input().split()]
res = 0
res += dat[2] * 2
res += min(dat[0], dat[1]) * 2
if abs(dat[0] - dat[1]) >= 1:
	res += 1
print(res)


import sys
from collections import Counter
(na, nb, nab) = map(int, sys.stdin.readline().split())
(nmin, nmax) = (min(na, nb), max(na, nb))
tot = nmin + min(nmin + 1, nmax)
print(2 * nab + tot)


def find_len(a, b, c):
	if a == b:
		print(2 * (a + c))
	else:
		print(2 * (min(a, b) + c) + 1)
(a, b, c) = map(int, input().split(' '))
find_len(a, b, c)


(a, b, c) = [int(x) for x in input().split()]
s = 2 * c
s += 2 * min(a, b)
if max(a, b) - min(a, b) > 0:
	s += 1
print(s)


def gns():
	return [int(x) for x in input().split()]
(a, b, ab) = gns()
if a == b:
	print(2 * a + ab * 2)
	quit()
print(min(a, b) * 2 + ab * 2 + 1)


(a, b, ab) = [int(x) for x in input().split()]
if a > b:
	print(2 * ab + 2 * b + 1)
elif a == b:
	print(2 * ab + 2 * a)
else:
	print(1 + 2 * ab + 2 * a)


(a, b, c) = map(int, input().split())
if a == b:
	print(a + b + c * 2)
else:
	ans = c * 2
	if a > b:
		ans += b + b + 1
	else:
		ans += a + a + 1
	print(ans)


(a, b, ab) = list(map(int, input().split()))
(Sum, a, b) = ((ab + min(a, b)) * 2, a - min(a, b), b - min(a, b))
print(Sum + (1 if a != 0 else 0) + (1 if b != 0 else 0))


(a, b, c) = map(int, input().split())
print(2 * c + min(a, b) * 2 + min(max(0, a - min(a, b)), 1) + min(1, max(0, b - min(a, b))))


(a, b, c) = map(int, input().split())
if a > b:
	print(2 * c + 2 * b + 1)
elif b > a:
	print(2 * c + 2 * a + 1)
elif a == b:
	print(2 * c + a + b)


l = list(map(int, input().split(' ')))
(a, b, c) = l
k = 2
if a == b:
	h = a + b + c * k
else:
	if a < b:
		c1 = a
	else:
		c1 = b
	h = c1 + c1 + 1 + c * k
print(h)


(a, b, ab) = [int(i) for i in input().split(' ')]
n = 0
ab = 2 * ab
if a > b:
	n = a - b
	n = n - 1
elif b > a:
	n = b - a
	n = n - 1
if n == 0:
	print(ab + a + b)
elif n > 0:
	print(a + b + ab - n)


(x, y, z) = map(int, input().split())
if x > y:
	size = 2 * (z + y) + 1
elif x < y:
	size = 2 * (z + x) + 1
elif x == y:
	size = 2 * (x + z)
print(size)


def main(args):
	norm = 'a'
	s = input()
	d = [int(i) for i in s.split()]
	if d[0] == d[1]:
		ans = 2 * d[0] + d[2] * 2
	else:
		ans = min(d[0], d[1]) * 2 + d[2] * 2 + 1
	print(ans)
	return 0
import sys
sys.exit(main(sys.argv))


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
ans = 0
count_a = count_b = count_c = 0
count_a = a + c
count_b = b + c
if count_b == count_a:
	ans = 2 * count_b
else:
	ans = 2 * min(count_a, count_b) + 1
print(ans)


(x1, y1, z1) = input().split()
x = int(x1)
y = int(y1)
z = int(z1)
if abs(x - y) <= 1:
	print(x + y + 2 * z)
elif x < y:
	print(x + (x + 1) + 2 * z)
else:
	print(y + (y + 1) + 2 * z)


(a, b, c) = [int(t) for t in input().split(' ')]
result = c * 2 + min(a, b) * 2 + min(max(a, b) - min(a, b), 1)
print(result)


(a, b, c) = map(int, input().split())
g = min(a, b)
f = g * 2
a = a - g
b = b - g
if c > 0:
	f += c * 2
if a > 0 or b > 0:
	print(f + 1)
else:
	print(f)


numbers = [int(x) for x in str(input()).split()]
total = numbers[2] * 2
minValue = min(numbers[0], numbers[1])
total += minValue * 2
if numbers[0] - minValue > 0 or numbers[1] - minValue > 0:
	total += 1
print(total)


s = list(input().split(' '))
a = int(s[0])
b = int(s[1])
c = int(s[2])
cf = 2 * c
if a > 0 and b > 0:
	x = min(a, b)
	a = a - x
	b = b - x
	cf = cf + 2 * x
if a != 0:
	a = a - 1
	cf = cf + 1
if b != 0:
	b = b - 1
	cf = cf + 1
print(cf)


arr = input().split()
a = int(arr[0])
b = int(arr[1])
c = int(arr[2])
sum = 0
sum += c * 2
if a - b >= 1:
	sum += b * 2 + 1
elif b - a >= 1:
	sum += a * 2 + 1
elif a - b == 0:
	sum += a * 2
print(sum)


s = list(map(int, input().split()))
a = s[0]
b = s[1]
c = s[2]
if a == b:
	ans = 2 * a + 2 * c
if a > b:
	if a >= b + 1:
		ans = 2 * b + 1 + 2 * c
	else:
		ans = 2 * b + 2 * c
if a < b:
	if b >= a + 1:
		ans = 2 * a + 1 + 2 * c
	else:
		ans = 2 * a + 2 * c
print(ans)


(a, b, c) = map(int, input().split())
s = c * 2
if a >= b:
	s += 2 * b + max(0, min(a - b, 1))
else:
	s += 2 * a + max(0, min(b - a, 1))
print(s)


import math
import bisect
import heapq
from collections import defaultdict

def egcd(a, b):
	if a == 0:
		return (b, 0, 1)
	else:
		(g, x, y) = egcd(b % a, a)
		return (g, y - b // a * x, x)

def mulinv(b, n):
	(g, x, _) = egcd(b, n)
	if g == 1:
		return x % n

def isprime(n):
	for d in range(2, int(math.sqrt(n)) + 1):
		if n % d == 0:
			return False
	return True

def argsort(ls):
	return sorted(range(len(ls)), key=ls.__getitem__)

def f(p=0):
	if p == 1:
		return map(int, input().split())
	elif p == 2:
		return list(map(int, input().split()))
	elif p == 3:
		return list(input())
	else:
		return int(input())

class DisjointSet:
	_disjoint_set = list()

	def __init__(self, init_arr):
		self._disjoint_set = []
		if init_arr:
			for item in list(set(init_arr)):
				self._disjoint_set.append([item])

	def _find_index(self, elem):
		for item in self._disjoint_set:
			if elem in item:
				return self._disjoint_set.index(item)
		return None

	def find(self, elem):
		for item in self._disjoint_set:
			if elem in item:
				return self._disjoint_set[self._disjoint_set.index(item)]
		return None

	def union(self, elem1, elem2):
		index_elem1 = self._find_index(elem1)
		index_elem2 = self._find_index(elem2)
		if index_elem1 != index_elem2 and index_elem1 is not None and (index_elem2 is not None):
			self._disjoint_set[index_elem2] = self._disjoint_set[index_elem2] + self._disjoint_set[index_elem1]
			del self._disjoint_set[index_elem1]
		return self._disjoint_set

	def get(self):
		return self._disjoint_set

def graph(n, m, edg=False):
	edges = []
	visited = [0] * n
	g = [list() for _ in range(n + 1)]
	for i in range(m):
		(u, v) = f(1)
		g[u].append(v)
		g[v].append(u)
		if edg:
			edges.append((u, v))
	if edg:
		return (g, visited, edg)
	else:
		return (g, visited)

def bfs(g, visited):
	queue = [1]
	visited[1] = 1
	for u in queue:
		for v in g[u]:
			if visited[v] == 0:
				queue.append(v)
			visited[v] = 1

def dfs(u, g, visited):
	print(u)
	visited[u] = 1
	for v in g[u]:
		if visited[v] == 0:
			dfs(v, g, visited)
(n, a, b) = f(1)
res = 0
if a != n:
	res = 1
print(2 * b + 2 * min(n, a) + res)


(a, b, ab) = input().split()
a = int(a)
b = int(b)
ab = int(ab)
if a == b:
	count = a * 2
else:
	count = 2 * min(a, b) + 1
count = count + ab * 2
print(count)


def solve(A):
	res = 0
	res += 2 * A[2]
	mn = min(A[0], A[1])
	res += 2 * mn
	A[0] -= mn
	A[1] -= mn
	if A[0] > 0:
		res += 1
	if A[1] > 0:
		res += 1
	return res
arr = input().split(' ')
A = [int(n) for n in arr]
print(solve(A))


def input_ints():
	return list(map(int, input().split()))

def main():
	(a, b, c) = input_ints()
	if a > b:
		a = b + 1
	if b > a:
		b = a + 1
	print(a + b + 2 * c)
main()


(a, b, c) = list(map(int, input().split()))
p = 0
p = p + c * 2
if a == b:
	p = p + a + b
elif a < b:
	p = p + a * 2 + 1
elif a > b:
	p = p + 2 * b + 1
print(p)


s = input()
l = s.split(' ')
a = int(l[0])
b = int(l[1])
c = int(l[2])
min = a
if b < min:
	min = b
len = c * 2 + min * 2
if a != b:
	len = len + 1
print(len)


import math, string, itertools, fractions, heapq, collections, re, array, bisect, sys, random, time, queue, copy
sys.setrecursionlimit(10 ** 7)
inf = 10 ** 20
mod = 10 ** 9 + 7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]

def LI():
	return [int(x) for x in sys.stdin.readline().split()]

def LI_():
	return [int(x) - 1 for x in sys.stdin.readline().split()]

def I():
	return int(sys.stdin.readline())

def LS():
	return sys.stdin.readline().split()

def S():
	return input()

def main():
	(a, b, c) = LI()
	ans = c * 2
	if abs(a - b) >= 2:
		ans += min(a, b) * 2 + 1
	else:
		ans += a
		ans += b
	return ans
print(main())


(n, l, s) = map(int, input().split())
if n != l:
	print(s * 2 + 2 * min(n, l) + 1)
else:
	print(s * 2 + 2 * min(n, l))


(a, b, c) = tuple(map(int, input().split()))
res = 2 * (c + min(a, b))
if a != b:
	res += 1
print(res)


(a, b, c) = map(int, input().split())
ans = c * 2
c = min(a, b)
d = max(a, b)
if c != d:
	ans += 1
print(ans + c * 2)


(a, b, ab) = [int(u) for u in input().split()]
l = 2 * ab + 2 * min(a, b) + 1 * (a != b)
print(l)


(a, b, c) = [int(i) for i in input().split()]
res = 2 * c
x = min(a, b)
if a == b:
	res += 2 * a
elif a > b:
	res += 2 * b + 1
else:
	res += 2 * a + 1
print(res)


(a, b, c) = (int(i) for i in input().split())
if abs(a - b) <= 1:
	print(a + b + 2 * c)
else:
	print((min(a, b) + c) * 2 + 1)


pqr = input().split()
p = int(pqr[0])
q = int(pqr[1])
r = int(pqr[2])
s = min(p, q)
total = 2 * r + 2 * s
if p == q:
	print(total)
else:
	print(total + 1)


[a, b, c] = [int(i) for i in input().split()]
if a == 0 or b == 0:
	print(2 * c + (1 if a + b > 0 else 0))
else:
	m = min(a, b)
	a -= m
	b -= m
	c += m
	print(c * 2 + (1 if a + b > 0 else 0))


line = input()
(a, b, c) = map(int, line.split())
x = min(a, b)
y = max(a, b) - x
res = 2 * c + 2 * x
if y > 0:
	res += 1
print(res)


(a, b, c) = map(int, input().split())
value = c * 2
if a == b and b > 0:
	value += b + a
elif a > b and b > 0:
	value += b * 2
	a -= b
	b = 0
	if a > 0:
		value += 1
elif a < b and a > 0:
	value += a * 2
	b -= a
	a = 0
	if b > 0:
		value += 1
print(value)


from collections import Counter
(a, b, c) = map(int, input().split())
print(2 * (min(a, b) + c) + (1 if a > b or b > a else 0))


from sys import stdin, stdout
import bisect

def main():
	(a, b, c) = map(int, input().split())
	ans = min(a, b) * 2 + c * 2 + 1
	if a == b:
		print(ans - 1)
	else:
		print(ans)
main()


v = input().split()
a = [int(i) for i in v]
if a[0] - a[1] == 0:
	x = 0
else:
	x = 1
ans = a[2] * 2 + min(a[0], a[1]) * 2 + x
print(ans)


import sys
inf = float('inf')
mod = 1000000007

def get_array():
	return list(map(int, sys.stdin.readline().split()))

def get_ints():
	return map(int, sys.stdin.readline().split())

def input():
	return sys.stdin.readline()

def int1():
	return int(input())
import string
import math
from itertools import combinations

def main():
	(a, b, c) = get_array()
	a1 = a + c
	b1 = b + c
	if a1 > b1:
		print(2 * b1 + 1)
	elif b1 > a1:
		print(2 * a1 + 1)
	if a1 == b1:
		print(a1 + b1)
main()


x = [int(i) for i in input().split()]
(a, b, c) = (x[0], x[1], x[2])
if a == b:
	print(2 * (b + c))
elif a != b:
	print(2 * (min(a, b) + c) + 1)


(a, b, ab) = [int(x) for x in input().split()]
val = 2 * (ab + min(a, b))
m = min(a, b)
a = a - m
b = b - m
if a != 0 or b != 0:
	print(val + 1)
else:
	print(val)


l = list(map(int, input().split()))
count = 0
count += l[2] * 2
if l[0] < l[1]:
	count += l[0] * 2 + 1
elif l[0] > l[1]:
	count += l[1] * 2 + 1
else:
	count += l[0] + l[1]
print(count)


(a, b, c) = map(int, input().strip().split())
pairs = min(a, b)
total = pairs * 2 + c * 2
if max(a, b) - pairs >= 1:
	total += 1
print(total)


def solve(a, b, c):
	ans = c * 2
	if a == b:
		ans += a * 2
		return ans
	else:
		ans += min(a, b) * 2 + 1
		return ans

def main():
	(a, b, c) = list(map(int, input().split()))
	print(solve(a, b, c))
main()


(a, b, c) = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
min_val = min(a, b)
out = c * 2 + min(a, b) * 2
a -= min_val
b -= min_val
if a or b:
	out += 1
print(out)


from collections import *
from math import *
cin = lambda : [*map(int, input().split())]
(a, b, ab) = cin()
ans = 2 * min(a, b) + 2 * ab
if a != b:
	ans += 1
print(ans)


import time

def checkingStrings(qA, qB, qAB):
	maxLen = 0
	maxAB = max(qA, qB)
	if abs(qA - qB) > 1:
		if maxAB == qA:
			maxLen = qB * 2 + 1
		elif maxAB == qB:
			maxLen = qA * 2 + 1
	else:
		maxLen = qA + qB
	maxLen += qAB * 2
	return maxLen

def solve():
	(qA, qB, qAB) = [int(x) for x in input().split()]
	print(checkingStrings(qA, qB, qAB))
solve()


(a, b, c) = [int(i) for i in input().split()]
n = c * 2
x = min(a, b)
n = n + x * 2
if a != b:
	n = n + 1
print(n)


l = list(input().split())
a = int(l[0])
b = int(l[1])
c = int(l[2])
length = min(a, b) * 2 + c * 2
if a != b:
	length += 1
print(length)


a = list(map(int, input().split()))
if a[1] > a[0]:
	print(2 * a[0] + 1 + 2 * a[2])
elif a[0] > a[1]:
	print(2 * a[1] + 2 * a[2] + 1)
else:
	print(2 * a[1] + 2 * a[2])


def go():
	(x, y, z) = [int(i) for i in input().split(' ')]
	answer = z * 2 + 2 * min(x, y)
	if x == y:
		return answer
	return answer + 1
print(go())


import sys, os
f = lambda : list(map(int, input().split()))
if 'local' in os.environ:
	sys.stdin = open('./input.txt', 'r')

def solve():
	(a, b, c) = f()
	mxlen = 2 * c
	com = min(a, b)
	mxlen += 2 * com
	a -= com
	b -= com
	if a or b:
		mxlen += 1
	print(mxlen)
solve()


(a, b, c) = list(map(int, input().split()))
t = 0 if a == b else 1
print(min(a, b) * 2 + c * 2 + t)


n = list(map(int, input().split()))
if n[0] == n[1]:
	print(n[0] + n[1] + 2 * n[2])
elif n[0] > n[1]:
	s = n[0] - n[1]
	n[0] = n[0] - (s - 1)
	print(n[0] + n[1] + 2 * n[2])
else:
	s = n[1] - n[0]
	n[1] = n[1] - (s - 1)
	print(n[0] + n[1] + 2 * n[2])


(a, b, ab) = map(int, input().strip().split()[:3])
k = min(a, b)
if a == k:
	s = b - k
else:
	s = a - k
if s == 0:
	print(k * 2 + ab * 2)
else:
	print(k * 2 + ab * 2 + 1)


lst = input().split()
numa = int(lst[0])
numb = int(lst[1])
numab = int(lst[2])
numab *= 2
if numb > numa:
	print(numa + numa + 1 + numab)
elif numa > numb:
	print(numb + numb + 1 + numab)
else:
	print(numa + numb + numab)


(a, b, c) = [int(x) for x in input().split()]
ans = int(0)
ans += c * 2
if a > b:
	ans += b * 2
	ans += 1
	print(ans)
elif a == b:
	ans += a * 2
	print(ans)
else:
	ans += a * 2
	print(ans + 1)


from collections import defaultdict, deque
(a, b, c) = map(int, input().split())
total = c * 2
total += 2 * min(a, b)
if a != b:
	total += 1
print(total)


(a, b, ab) = map(int, input().split())
Total_ab = 2 * ab
if a == b:
	total_a_b = a + b
elif a > b:
	total_a_b = 2 * b + 1
else:
	total_a_b = 2 * a + 1
total = Total_ab + total_a_b
print(total)


from sys import stdin, stdout
from itertools import combinations
from collections import defaultdict, OrderedDict
import math
import heapq

def listIn():
	return list(map(int, stdin.readline().strip().split()))

def stringListIn():
	return [x for x in stdin.readline().split()]

def intIn():
	return int(stdin.readline())

def stringIn():
	return stdin.readline().strip()
(a, b, c) = listIn()
if a == b:
	print(a + b + 2 * c)
elif a > b:
	print(2 * (b + c) + 1)
else:
	print(2 * (a + c) + 1)


(a, b, c) = map(int, input().strip().split())
a -= 1
b -= 1
r = c * 2 + 2 + min(a, b) * 2
f = min(a, b)
a -= f
b -= f
if a > 0 or b > 0:
	print(r + 1)
else:
	print(r)


(*ab, c) = map(int, input().split())
ab.sort()
print(ab[0] + min(ab[0] + 1, ab[1]) + c * 2)


abc = input().split()
na = int(abc[0])
nb = int(abc[1])
nc = int(abc[2])
if nb > na:
	count = 2 * na + 1 + 2 * nc
elif na > nb:
	count = 2 * nb + 1 + 2 * nc
else:
	count = 2 * nc + na + nb
print(count)


(a, b, c) = map(int, input().split())

def f():
	if a == b:
		return 2 * a + 2 * c
	else:
		return 2 * c + min(a, b) * 2 + 1
print(f())


import os

def _f(a, b, c):
	return 2 * c + min(a, b) * 2 + (1 if a != b else 0)

def f(a, b, c):
	return _f(a, b, c)
if os.environ.get('DEBUG', False):
	print(f'{f(1, 1, 1)} = 4')
	print(f'{f(2, 1, 2)} = 7')
	print(f'{f(3, 5, 2)} = 11')
	print(f'{f(2, 2, 1)} = 6')
	print(f'{f(1000000000, 1000000000, 1000000000)} = 4000000000')
else:
	(a, b, c) = list(map(int, input().split()))
	print(f(a, b, c))


import sys
commands = []

def swap_x_y(array_, x, y):
	temp = array_[x - 1]
	array_[x - 1] = array_[y - 1]
	array_[y - 1] = temp

def mega_swap(array_, x):
	n = len(array_)
	h = n // 2 + 1
	y = array_[x - 1]
	first = 1
	last = 1
	if x < h:
		first = n
	if y < h:
		last = n
	commands.append(str(x) + ' ' + str(first))
	swap_x_y(array_, x, first)
	if first == y:
		return 0
	if first != last:
		commands.append(str(last) + ' ' + str(first))
		swap_x_y(array_, first, last)
	commands.append(str(y) + ' ' + str(last))
	swap_x_y(array_, last, y)

def count(array_):
	answ = 0
	for (i, x) in enumerate(array_[1:n - 1]):
		if i + 2 == x:
			answ += 1
	return answ
data = list(map(int, input().split(' ')))
answ = data[2] * 2 + data[0] + data[1]
answ -= abs(data[0] - data[1]) - 1 if data[0] != data[1] else 0
print(answ)


from sys import stdin, stdout
import math, sys, heapq
from itertools import permutations, combinations
from collections import defaultdict, deque, OrderedDict
from os import path
import bisect as bi

def yes():
	print('YES')

def no():
	print('NO')
if path.exists('input.txt'):
	sys.stdin = open('input.txt', 'r')
	sys.stdout = open('output.txt', 'w')

	def I():
		return int(input())

	def In():
		return map(int, input().split())
else:

	def I():
		return int(stdin.readline())

	def In():
		return map(int, stdin.readline().split())

def dict(a):
	d = {}
	for x in a:
		if d.get(x, -1) != -1:
			d[x] += 1
		else:
			d[x] = 1
	return d

def find_gt(a, x):
	i = bi.bisect_right(a, x)
	if i != len(a):
		return i
	else:
		return -1

def main():
	try:
		(a, b, c) = In()
		ans = 2 * c
		if a > b:
			ans += 2 * b
			ans += 1
			print(ans)
		elif b > a:
			ans += 2 * a
			ans += 1
			print(ans)
		else:
			ans += 2 * a
			print(ans)
	except:
		pass
M = 998244353
P = 1000000007
Inf = 1000000000000000000
for _ in range(1):
	main()


(a, b, c) = map(int, input().split())
mm = max(a, b)
mm1 = min(a, b) + 1
mmm = min(mm, mm1)
mn = min(a, b)
print(c * 2 + mn + mmm)


l = list(map(int, input().split()))
su = 0
su += l[2] * 2
su += min(l[0], l[1]) * 2 + 1
if l[0] == l[1]:
	su -= 1
print(su)


x = input()
(a, b, c) = map(int, x.split())
sum = 0
sum = sum + 2 * c
if a > b:
	sum = sum + 2 * b + 1
elif a == b:
	sum = sum + 2 * a
else:
	sum = sum + 2 * a + 1
print(sum)


(a, b, c) = list(map(int, input().split()))
ans = (min(a, b) + c) * 2
if a != b:
	ans += 1
print(ans)


s = 0
(a, b, c) = map(int, input().split())
s += 2 * c
x = min(a, b)
a -= x
b -= x
s += 2 * x
if a > 0:
	s += 1
if b > 0:
	s += 1
print(s)


x = [int(i) for i in input().split()]
(a, b, c) = (x[0], x[1], x[2])
if abs(a - b) > 1:
	if a > b:
		a -= a - b - 1
	else:
		b -= b - a - 1
print(a + b + c * 2)


from sys import stdin
n = stdin.readline()
n = n.rstrip('\n')
n = n.split(' ')
n = [int(i) for i in n]
if n[0] == n[1]:
	print(n[0] * 2 + n[2] * 2)
elif abs(n[0] - n[1]) == 1:
	print(n[0] + n[1] + n[2] * 2)
else:
	print(min(n[0], n[1]) * 2 + n[2] * 2 + 1)


import sys
(a, b, c) = map(int, input().split())
maxlength = 0
maxlength += 2 * c
n = max(a, b) - (max(a, b) - min(a, b))
a -= n
b -= n
maxlength += n * 2
if a or b:
	maxlength += 1
print(maxlength)


def s():
	(a, b, c) = [int(x) for x in input().split(' ')]
	ans = c * 2
	temp = min(a, b)
	temp2 = max(a, b)
	ans += temp
	if temp2 > temp + 1:
		ans += temp + 1
	else:
		ans += temp2
	print(ans)
s()


(a, b, c) = input().split()
(a, b, c) = (int(a), int(b), int(c))
if abs(a - b) == 0 or abs(a - b) == 1:
	print(a + b + 2 * c)
elif a > b:
	print(b * 2 + 1 + 2 * c)
else:
	print(a * 2 + 1 + 2 * c)


(a, b, c) = input().split()
(a, b, c) = (int(a), int(b), int(c))
if a == b:
	print(a + b + c + c)
elif a > b:
	print(1 + b + c + b + c + 1 - 1)
elif a < b:
	print(a + c + a + c + 1)


d = input().split()
a = int(d[0])
b = int(d[1])
c = int(d[2])
c += min(a, b)
d = abs(a - b)
if d < 1:
	print(c * 2)
else:
	print(c * 2 + 1)


def solve():
	(x, y, z) = map(int, input().split())
	if abs(y - x) > 0:
		return 2 * (z + min(x, y)) + 1
	else:
		return 2 * z + x + y
print(solve())


l = input().split()
(a, b, c) = (int(l[0]), int(l[1]), int(l[2]))
ans = 2 * (c + min(a, b)) + (1 if a != b else 0)
print(ans)


from sys import setcheckinterval, stdin
setcheckinterval(1000)
iin = lambda : int(stdin.readline())
lin = lambda : list(map(int, stdin.readline().split()))
(a, b, c) = lin()
ans = min(a, b) * 2 + c * 2
ans += 1 if a != b else 0
print(ans)


(a, b, c) = [int(x) for x in input().split()]
len = 0
if a < b:
	len += 2 * a
	d = b - a
else:
	len = len + 2 * b
	d = a - b
len += 2 * c
if d >= 1:
	len += 1
print(len)


(aCount, bCount, abCount) = map(int, input().split())
print(abCount * 2 + min(aCount, bCount) * 2 + (aCount != bCount))


import itertools
import math
import sys
import heapq
from collections import Counter
from collections import deque
from fractions import gcd
from functools import reduce
sys.setrecursionlimit(4100000)
INF = 1 << 60
MOD = 10 ** 9 + 7
(a, b, c) = map(int, input().split())
ans = c * 2
if a == b:
	ans += a + b
else:
	ans += min(a, b) * 2 + 1
print(ans)


(a, b, c) = list((int(x) for x in input().split()))
d = min(a, b)
a -= d
b -= d
f = c * 2 + d * 2
if a > 0 or b > 0:
	f += 1
print(f)


(a, b, c) = map(int, input().strip().split())
tot = 2 * c
if b > a:
	tot += 2 * a + 1
elif a == b:
	tot += 2 * a
else:
	tot += 2 * b + 1
print(tot)


s = input().split()
(a, b, c) = (int(s[0]), int(s[1]), int(s[2]))
cnt = 2 * c
cnt += 2 * min(a, b)
if a != b:
	cnt += 1
print(cnt)


from sys import stdin
input = stdin.readline
(a, b, c) = map(int, input().split())
out = c * 2
if abs(a - b) >= 1:
	out += 1
out += min(a, b) * 2
print(out)


def calc_max(a, b, ab):
	fp = min(a, b, ab)
	(a, b, ab) = map(lambda x: x - fp, (a, b, ab))
	count = fp * 4
	if ab == 0:
		count += min(a, b) * 2
		if a != b:
			count += 1
		return count
	count += ab * 2
	if a == b:
		return count
	return count + 1
(a, b, ab) = map(int, input().split())
print(calc_max(a, b, ab))


(a, b, c) = list(map(int, input().split()))
n = 0
n += 2 * (c + min(a, b))
if a != b:
	n += 1
print(n)


(a, b, c1) = map(int, input().split())
c2 = min(a, b)
res = (c1 + c2) * 2
a -= c2
b -= c2
if a:
	res += 1
if b:
	res += 1
print(res)


(a, b, c) = (int(v) for v in input().split())
if a == b:
	print(2 * a + 2 * c)
else:
	print(min(a, b) * 2 + 2 * c + 1)


(a, b, c) = map(int, input().strip().split())
ans = 0
if a == b:
	ans = b + b + 2 * c
elif a > b:
	ans = b + b + 1 + 2 * c
else:
	ans = a + a + 1 + 2 * c
print(ans)


(A, B, C) = map(int, input().split(' '))
lg = min(A, B) * 2 + C * 2
if A != B:
	lg += 1
print(lg)


(a, b, c) = [int(i) for i in input().split(' ')]
ans = c * 2
d = min(a, b)
ans += 2 * d
if a != b:
	ans += 1
print(ans)


def x(a, b):
	if abs(a - b) > 0:
		return 1
	else:
		return 0
n = [int(i) for i in input().split()]
print((n[2] + min(n[1], n[0])) * 2 + x(n[1], n[0]))


(a, b, ab) = input().split(' ')
a = int(a)
b = int(b)
ab = int(ab)
menor = [a, b]
menor.sort()
menor = menor[0]
total = 2 * ab + menor * 2
if a != b:
	total += 1
print(total)


read = lambda : map(int, input().split())
(a, b, c) = read()
ans = c * 2 + (b * 2 if a == b else min(a, b) * 2 + 1)
print(ans)


from math import *
from itertools import *
from collections import *
(a, b, c) = map(int, input().split())
result = 0
if a > b:
	result = max(result, c * 2 + b * 2 + 1)
elif a == b:
	result = max(result, c * 2 + b * 2)
else:
	result = max(result, 1 + c * 2 + a * 2)
print(result)


(a, b, c) = map(int, input().split()[:3])
if a == 1 and b == 1:
	print(2 + 2 * c)
elif a == b:
	print(2 * c + a + b)
elif a < b:
	print(2 * c + 2 * a + 1)
else:
	print(2 * c + 2 * b + 1)


In = input().split()
a = int(In[0])
b = int(In[1])
c = int(In[2])
if a == b:
	print(2 * c + (a + b))
if a > b:
	print(2 * c + (a + b) - (a - (b + 1)))
if b > a:
	print(2 * c + (a + b) - (b - (a + 1)))


from math import sqrt

def mi():
	return map(int, input().split())

def li():
	return list(mi())

def ii():
	return int(input())

def si():
	return input()
mod = 1000000007
(a, b, c) = mi()
s = c * 2
if a > b:
	s += 2 * b + 1
elif b > a:
	s += 2 * a + 1
else:
	s += 2 * a
print(s)


(a, b, ab) = tuple(map(int, input().split()))
x = ab * 2 + min(a, b) * 2 + bool(a != b)
print(x)


(a, b, c) = map(int, input().split())
m = min(a, b)
a -= m
b -= m
r = 2 * c + 2 * m
if a or b:
	r += 1
print(r)


ch = input('')
(a, b, ab) = map(lambda x: int(x), ch.split())
if a > b:
	print(2 * b + 2 * ab + 1)
elif a < b:
	print(2 * a + 2 * ab + 1)
else:
	print(2 * a + 2 * ab)


import re, math, decimal, bisect

def read():
	return input().strip()

def iread():
	return int(input().strip())

def viread():
	return [int(_) for _ in input().strip().split()]

def round(n):
	return int(n + 0.5)
(a, b, c) = viread()
print(c * 2 + min(a, b) * 2 + (1 if a != b else 0))


x = input().split()
a = int(x[0])
b = int(x[1])
c = int(x[2])
ans = c * 2 + min(a, b) * 2
if a != b:
	ans += 1
print(ans)


def main():
	(a, b, c) = map(int, input().split())
	ans = 2 * c
	ans += 2 * min(a, b)
	if a != b:
		ans += 1
	print(ans)
main()


a = list(map(int, input().split()))
c = a[2] * 2
c = c + 2 * min(a[0], a[1])
if a[1] - a[0] > 0 or a[0] - a[1] > 0:
	print(c + 1)
else:
	print(c)


(a, b, c) = map(int, input().split())
if a == b:
	print(a + b + 2 * c)
elif a - b == 1 or b - a == -1:
	print(a + b + 2 * c)
else:
	p = min(a, b)
	print(2 * (p + c) + 1)


a = input().split()
n = int(a[0])
m = int(a[1])
o = int(a[2])
if n > m:
	(n, m) = (m, n)
if n == m:
	print(o * 2 + n * 2)
else:
	print(o * 2 + n * 2 + 1)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
leng = c * 2
if a > b:
	leng = leng + b * 2
	dif = a - b
if b > a:
	leng = leng + a * 2
	dif = b - a
if b == a:
	leng = leng + a * 2
	dif = 0
if dif > 0:
	leng = leng + 1
print(leng)


(a, b, c) = map(int, input().split())
k = int(0)
if a > b:
	k = 2 * b + 1 + 2 * c
elif a == b:
	k = 2 * a + 2 * c
else:
	k = 2 * a + 1 + 2 * c
print(k)


n = input().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
if a < b:
	print(2 * a + 1 + 2 * c)
if a > b:
	print(2 * b + 1 + 2 * c)
if a == b:
	print(2 * a + 2 * c)


def another_one_bites_the_dust():
	(a, b, c) = map(int, input().split(sep=' '))
	sum = c * 2
	if a == b:
		sum += b * 2
	elif a > b:
		sum += b * 2 + 1
	else:
		sum += a * 2 + 1
	print(sum)
another_one_bites_the_dust()


import os
import sys
import math
from io import BytesIO, IOBase
from fractions import Fraction
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')
(a, b, c) = map(int, input().split())
ct = 2 * c
m = min(a, b)
a -= m
b -= m
ct += 2 * m
if a != 0 or b != 0:
	ct += 1
print(ct)


(x, y, z) = map(int, input().split())
print(2 * z + min(x, y) + min(max(x, y), min(x, y) + 1))


from sys import stdin, stdout, exit as sys_ret
(f_input, f_print, f_flush) = (stdin.readline, stdout.write, stdout.flush)
(first, second, third) = map(int, f_input().split())
length = 2 * third + 2 * min(first, second)
if min(first, second) != max(first, second):
	length += 1
f_print(str(length))


(a, b, c) = [int(i) for i in input().split()]
print(2 * c + 2 * min(a, b) + (a > b) + (a < b))


a = list(map(int, input().split()))
t = 0
t = t + 2 * min(a[0], a[1])
t = t + 2 * a[2]
if a[0] != a[1]:
	t = t + 1
print(t)


import sys
import math
import bisect

def query_first(a, b, c):
	ans = c * 2
	c = 0
	tmp = min(a, b)
	ans += tmp * 2
	a -= tmp
	b -= tmp
	if a:
		ans += 1
		a -= 1
	return ans

def query_second(a, b, c):
	ans = 0
	if b:
		b -= 1
		ans += 1
		ans += c * 2
		c = 0
		tmp = min(a, b)
		ans += tmp * 2
		a -= tmp
		b -= tmp
		if a:
			ans += 1
			a -= 1
	return ans

def main():
	(a, b, c) = map(int, input().split())
	print(max(query_first(a, b, c), query_second(a, b, c)))
main()


def ans():
	N = input().split()
	A = int(N[0])
	B = int(N[1])
	C = int(N[2])
	if A == B:
		print(C * 2 + A + B)
	else:
		print(C * 2 + min(A, B) * 2 + 1)
ans()


def solve():
	l = list(map(int, input().split()))
	if l[0] != l[1]:
		print(2 * min(l[0], l[1]) + 1 + l[2] + l[2])
	else:
		print(sum(l) + l[2])
solve()


L = list(map(int, input().split()))
a = L[0]
b = L[1]
c = L[2]
d = min(a, b)
ab_poss = c + d
a -= d
b -= d
ans = ab_poss * 2
if a > 0:
	ans += 1
if b > 0:
	ans += 1
print(ans)


from sys import stdin
input = stdin.readline
(a, b, c) = map(int, input().split())
res = 2 * c + min(a, b) * 2 + 1 if a != b else 2 * c + min(a, b) * 2
print(res)


T_ON = 0
DEBUG_ON = 1
MOD = 998244353

def solve():
	(a, b, c) = read_ints()
	total = 0
	total += 2 * c
	x = min(a, b)
	total += 2 * x
	if a != b:
		total += 1
	print(total)

def main():
	T = read_int() if T_ON else 1
	for i in range(T):
		solve()

def debug(*xargs):
	if DEBUG_ON:
		print(*xargs)
from collections import *
import math
import os
import sys
from io import BytesIO, IOBase
BUFSIZE = 8192

class FastIO(IOBase):
	newlines = 0

	def __init__(self, file):
		self._fd = file.fileno()
		self.buffer = BytesIO()
		self.writable = 'x' in file.mode or 'r' not in file.mode
		self.write = self.buffer.write if self.writable else None

	def read(self):
		while True:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			if not b:
				break
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines = 0
		return self.buffer.read()

	def readline(self):
		while self.newlines == 0:
			b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
			self.newlines = b.count(b'\n') + (not b)
			ptr = self.buffer.tell()
			(self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr))
		self.newlines -= 1
		return self.buffer.readline()

	def flush(self):
		if self.writable:
			os.write(self._fd, self.buffer.getvalue())
			(self.buffer.truncate(0), self.buffer.seek(0))

class IOWrapper(IOBase):

	def __init__(self, file):
		self.buffer = FastIO(file)
		self.flush = self.buffer.flush
		self.writable = self.buffer.writable
		self.write = lambda s: self.buffer.write(s.encode('ascii'))
		self.read = lambda : self.buffer.read().decode('ascii')
		self.readline = lambda : self.buffer.readline().decode('ascii')
(sys.stdin, sys.stdout) = (IOWrapper(sys.stdin), IOWrapper(sys.stdout))
input = lambda : sys.stdin.readline().rstrip('\r\n')

def read_int():
	return int(input())

def read_ints():
	return list(map(int, input().split()))

def print_nums(nums):
	print(' '.join(map(str, nums)))

def YES():
	print('YES')

def Yes():
	print('Yes')

def NO():
	print('NO')

def No():
	print('No')

def First():
	print('First')

def Second():
	print('Second')

def fib(n):
	(a, b) = (0, 1)
	for _ in range(n):
		(a, b) = (b, a + b)
	return a

def fib_ns(n):
	assert n >= 1
	f = [0 for _ in range(n + 1)]
	f[0] = 0
	f[1] = 1
	for i in range(2, n + 1):
		f[i] = f[i - 1] + f[i - 2]
	return f

def fib_to_n(n):
	f = []
	(a, b) = (0, 1)
	while a <= n:
		f.append(a)
		(a, b) = (b, a + b)
	return f

def gcd(a, b):
	if a == 0:
		return b
	return gcd(b % a, a)

def xgcd(a, b):
	(x0, x1, y0, y1) = (0, 1, 1, 0)
	while a != 0:
		((q, a), b) = (divmod(b, a), a)
		(y0, y1) = (y1, y0 - q * y1)
		(x0, x1) = (x1, x0 - q * x1)
	return (b, x0, y0)

def lcm(a, b):
	d = gcd(a, b)
	return a * b // d

def is_even(x):
	return x % 2 == 0

def is_odd(x):
	return x % 2 == 1

def modinv(a, m):
	(g, x, _) = xgcd(a, m)
	if g != 1:
		raise Exception('gcd(a, m) != 1')
	return x % m

def mod_add(x, y):
	x += y
	while x >= MOD:
		x -= MOD
	while x < 0:
		x += MOD
	return x

def mod_mul(x, y):
	return x * y % MOD

def mod_pow(x, y):
	if y == 0:
		return 1
	if y % 2:
		return mod_mul(x, mod_pow(x, y - 1))
	p = mod_pow(x, y // 2)
	return mod_mul(p, p)

def mod_inv(y):
	return mod_pow(y, MOD - 2)

def mod_div(x, y):
	return mod_mul(x, mod_inv(y))

def is_prime(n):
	if n == 1:
		return False
	for i in range(2, int(n ** 0.5) + 1):
		if n % i:
			return False
	return True

def gen_primes(n):
	P = [True for _ in range(n + 1)]
	P[0] = P[1] = False
	for i in range(int(n ** 0.5) + 1):
		if P[i]:
			for j in range(2 * i, n + 1, i):
				P[j] = False
	return P
main()


(a, b, c) = map(int, input().split())
ans = 0
if a > b:
	ans += 2 * c + b
else:
	ans += 2 * c + a
e = min(max(a, b), min(a, b) + 1)
print(ans + e)


(a, b, ab) = map(int, input().split())
k = min(a, b, ab)
ans = 4 * k
a = a - k
b = b - k
ab = ab - k
k = max(a, b, ab)
r = max(b, ab)
if k == b:
	if b:
		ans = ans + 1
		b = b - 1
	if ab:
		ans = ans + 2 * ab
	if a and b:
		ans = ans + 2 * min(a, b)
		a = a - min(a, b)
		b = b - min(a, b)
	if a:
		ans = ans + 1
elif k == ab:
	if ab:
		ans = ans + 2 * ab
	if a and b:
		ans = ans + 2 * min(a, b)
		a = a - min(a, b)
		b = b - min(a, b)
	if a:
		ans = ans + 1
	if b:
		ans = ans + 1
elif k == a:
	if ab:
		ans = ans + 2 * ab
	if a and b:
		ans = ans + 2 * min(a, b)
		a = a - min(a, b)
		b = b - min(a, b)
	if a:
		ans = ans + 1
print(ans)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
ans = c * 2
if a == b:
	ans += a + b
else:
	i = min(a, b)
	ans += i + i + 1
print(ans)


a = input()
a = a.split()
x = int(a[0])
y = int(a[1])
z = int(a[2])
s = min(x, y)
sum = 2 * (s + z)
if x != y:
	sum += 1
print(sum)


import sys, math

def read_int():
	return int(sys.stdin.readline().strip())

def read_int_list():
	return list(map(int, sys.stdin.readline().strip().split()))

def read_string():
	return sys.stdin.readline().strip()

def read_string_list(delim=' '):
	return sys.stdin.readline().strip().split(delim)
(a, b, ab) = read_int_list()
ans = 0
ans += min(a, b) * 2
ans += ab * 2
temp = min(a, b)
a -= temp
b -= temp
if a > 0:
	ans += 1
if b > 0:
	ans += 1
print(ans)


(a, b, c) = list(map(int, input().split()))
num = int()
if a > b:
	num = b * 2 + c * 2 + 1
elif b > a:
	num = a * 2 + c * 2 + 1
else:
	num = a * 2 + c * 2
print(num)


k = input()
v = k.split()
if int(v[0]) != int(v[1]):
	print(min(int(v[0]), int(v[1])) * 2 + 1 + 2 * int(v[2]))
else:
	print(2 * (int(v[1]) + int(v[2])))


l = list(map(int, input().split()))
mx = max(l[0], l[1])
mn = min(l[0], l[1])
hr = mx - mn
if hr == 0:
	print(2 * mn + 2 * l[2])
else:
	print(2 * mn + 1 + 2 * l[2])


import sys
input = sys.stdin.readline
(a, b, ab) = map(int, input().split())
answer = ab * 2
if a > b:
	answer += b * 2 + 1
elif a < b:
	answer += a * 2 + 1
else:
	answer += a + b
print(answer)


(a, b, ab) = (int(x) for x in input().split())
m = min(a, b)
ans = ab * 2 + 2 * m
a -= m
b -= m
if a or b:
	ans += 1
print(ans)


(a, b, ab) = map(int, input().split())
count = 1
count = count * ab * 2
if a > b:
	count = count + 1
	count = count + b * 2
	print(str(count))
elif b > a:
	count = count + 1
	count = count + a * 2
	print(str(count))
elif b == a:
	count = count + b * 2
	print(str(count))


input_map = map(int, input().split(' '))
list = list(input_map)
if list[0] - list[1] >= 2:
	str = 2 * list[1] + 1 + list[2] * 2
elif list[0] - list[1] <= -2:
	str = 2 * list[0] + 1 + list[2] * 2
else:
	str = list[0] + list[1] + 2 * list[2]
print(str)


inp = input().split(' ')
inp = [int(n) for n in inp]
if inp[0] > inp[1]:
	inp[0] = inp[1] + 1
elif inp[1] > inp[0]:
	inp[1] = inp[0] + 1
print(inp[0] + inp[1] + 2 * inp[2])


a = [int(a) for a in input().split()]
if a[0] == a[1]:
	print(a[0] + a[1] + 2 * a[2])
elif a[0] > a[1]:
	print(2 * a[1] + 1 + 2 * a[2])
else:
	print(2 * a[0] + 1 + 2 * a[2])


(a, b, c) = input().split()
Max = 0
if a == b:
	Max = int(a) + int(b) + 2 * int(c)
else:
	Max = 2 * int(c) + 2 * min(int(a), int(b)) + 1
print(Max)


(a, b, c) = [int(i) for i in input().split()]
cc = min(a, b)
c += cc
a -= cc
b -= cc
if a == 0 and b == 0:
	print(c * 2)
else:
	print(c * 2 + 1)


def add(a, b):
	return a + b
	return [char for char in s]
(a, b, c) = map(int, input().split())
a_count = a + c
b_count = b + c
if a_count == b_count or a_count == b_count + 1 or a_count == b_count - 1:
	print(add(a_count, b_count))
elif a_count > b_count:
	a_count = min(a_count, b_count) + 1
	print(add(a_count, b_count))
else:
	b_count = min(b_count, a_count) + 1
	print(add(a_count, b_count))


a = [int(x) for x in input().split(' ')]
(q, w, r) = (a[0], a[1], a[2])
c = min(q, w)
ans = 2 * (r + c)
if q > c:
	ans += 1
if w > c:
	ans += 1
print(ans)


g = input().split()
a = int(g[0])
b = int(g[1])
c = int(g[2])
sum_a = a + c
sum_b = b + c
if sum_a == sum_b:
	print(sum_a + sum_b)
else:
	print(min(sum_a, sum_b) * 2 + 1)


x = list(map(int, input().split()))
print(x[0] + x[1] + x[2] * 2 if x[0] == x[1] else (min(x[0], x[1]) + x[2]) * 2 + 1)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
maxLength = 2 * c
m = min(a, b)
maxLength += 2 * m
if a > m or b > m:
	maxLength += 1
print(maxLength)


(a, b, c) = map(int, input().split())
ans = c * 2 + min(a, b) * 2 + (a - min(a, b) > 0) + (b - min(a, b) > 0)
print(ans)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
num_a = a + c
num_b = b + c
if num_a == num_b:
	leng = num_a + num_b
	print(leng)
elif num_a > num_b:
	leng = num_b * 2 + 1
	print(leng)
else:
	leng = num_a * 2 + 1
	print(leng)


w = input()
ww = w.split()
a = int(ww[0])
b = int(ww[1])
c = int(ww[2])
s = 0
s += 2 * c
if a > b:
	s = s + 1 + b * 2
elif b > a:
	s = s + 1 + a * 2
else:
	s += a * 2
print(s)


(A, B, C) = [int(_) for _ in input().split()]
ans = 2 * min(A, B) + 1 + 2 * C
if A == B:
	ans -= 1
print(ans)


import time
(a, b, c) = (int(i) for i in input().split())
start = time.time()
if a > b:
	(a, b) = (b, a)
print(a + min(a + 1, b) + c * 2)
finish = time.time()


from sys import stdin
import math
from collections import defaultdict
I = stdin.readline
(a, b, c) = map(int, I().split())
if a == b:
	print(a + b + 2 * c)
else:
	print(2 * c + 2 * min(a, b) + 1)


def check(list):
	a = abs(list[0] - list[1])
	if a <= 1:
		sum = list[0] + list[1] + 2 * list[2]
	else:
		b = min(list[0], list[1])
		sum = b + b + 1 + 2 * list[2]
	return sum
m = list(map(int, input().strip().split()))
print(check(m))


a = 'a'
b = 'b'
c = 'ab'
(x, y, z) = input().split()
x = int(x)
y = int(y)
z = int(z)
maxlength = x + y + 2 * z
if abs(x - y) == 1 or abs(x - y) == 0:
	print(maxlength)
else:
	maxlength = 2 * z + 2 * min(x, y) + 1
	print(maxlength)


(a, b, ab) = [int(i) for i in input().split()]
x = 0
if a != b:
	x = 1
print(min(a, b) * 2 + ab * 2 + x)


(a, b, c) = map(int, input().split())
l = c * 2
x = min(a, b)
l += x * 2
if b > a:
	b = b - a
	a = a - x
else:
	a = a - b
	b = b - x
if a != 0 or b != 0:
	l += 1
print(l)


(a, b, c) = [int(x) for x in input().split()]
s = 2 * c
if a == b:
	print(a + b + s)
else:
	m = min(a, b)
	print(s + 2 * m + 1)


(a, b, c) = map(int, input().split())
m = min(a, b)
a = a - m
b = b - m
count = c * 2 + m * 2
if a > 0:
	count += 1
if b > 0:
	count += 1
print(count)


a = input().split()
b = int(a[1])
ab = int(a[2])
a = int(a[0])
x = ab * 2 + min(a, b) * 2
(a, b) = (a - min(a, b), b - min(a, b))
if a != 0 or b != 0:
	x += 1
print(x)


import sys

def sol(a, b, c):
	a += c
	b += c
	if a > b + 1:
		a = b + 1
	if b > a + 1:
		b = a + 1
	return a + b
input_data = sys.stdin.read()
[a, b, c] = [int(i) for i in input_data.split()]
print(sol(a, b, c))


arr = [int(num) for num in input().split()]
m = min(arr[0], arr[1])
if arr[0] == arr[1]:
	print(m * 2 + arr[2] * 2)
else:
	print(m * 2 + arr[2] * 2 + 1)


def insertion_sort(l):
	for i in range(len(l)):
		for j in range(i):
			k = i - j
			if l[k] >= l[k - 1]:
				(l[k - 1], l[k]) = (l[k], l[k - 1])
			else:
				break
	return l

def selection_sort(l):
	for i in range(len(l)):
		min_ind = i
		min_val = l[i]
		for j in range(i, len(l)):
			if min_val > l[j]:
				min_val = l[j]
				min_ind = j
		(l[i], l[min_ind]) = (l[min_ind], l[i])
	return l

def bubble_sort(l):
	for i in range(len(l) - 1):
		for j in range(len(l) - 1 - i):
			if l[j] > l[j + 1]:
				(l[j], l[j + 1]) = (l[j + 1], l[j])
	return l

def is_even_list(l):
	for i in l:
		if i % 2:
			return False
	return True

def main_function():
	(a, b, c) = [int(i) for i in input().split(' ')]
	if a < b:
		(a, b) = (b, a)
	if a - b >= 1:
		count = 2 * b + 1 + 2 * c
	else:
		count = 2 * b + 2 * c
	return count
print(main_function())


(a, b, c) = [int(k) for k in input().split(' ')]
m = min(a, b)
M = min(m + 1, max(a, b))
res = m + M + 2 * c
print(res)


(a, b, ab) = map(int, input().split())
max_l = ab * 2 + min(a, b) * 2
if a != b:
	max_l += 1
print(max_l)


tt = input()
tt = tt.split()
a = int(tt[0])
b = int(tt[1])
c = int(tt[2])
len = 0
if c > 0:
	len += c * 2
if a == b:
	len += a * 2
if a > b:
	len += b * 2 + 1
if b > a:
	len += a * 2 + 1
print(len)


def inputSeperator(inputStr):
	return list(map(int, inputStr.split(' ')))
temp = inputSeperator(input())
a = temp[0]
b = temp[1]
c = temp[2]
if a > b:
	print(2 * c + 2 * b + 1)
elif b > a:
	print(2 * c + 2 * a + 1)
else:
	print(2 * c + 2 * a)


from math import *
from bisect import *
from collections import *
from random import *
from decimal import *
import sys
input = sys.stdin.readline

def inp():
	return int(input())

def st():
	return input().rstrip('\n')

def lis():
	return list(map(int, input().split()))

def ma():
	return map(int, input().split())
t = 1
while t:
	t -= 1
	(a, b, c) = ma()
	z = min(a, b)
	l = 2 * c + z + z
	a -= z
	b -= z
	l += (a > 0) + (b > 0)
	print(l)


def goodString(noOfAs, noOfBs, noOfABs):
	initial_value = noOfABs * 2
	if noOfAs > noOfBs:
		initial_value += noOfBs + (noOfBs + 1)
	elif noOfAs == noOfBs:
		initial_value += noOfAs + noOfBs
		return initial_value
	else:
		initial_value += noOfAs + (noOfAs + 1)
	return initial_value
(noOfAs, noOfBs, noOfABs) = map(int, input().split())
print(goodString(noOfAs, noOfBs, noOfABs))


lis = input().split()
a = int(lis[0])
b = int(lis[1])
ab = int(lis[2])
if a >= b:
	selisih = a - b
else:
	selisih = b - a
if selisih == 0 or selisih == 1:
	print(a + b + 2 * ab)
else:
	print(a + b - selisih + 1 + 2 * ab)


def f(a, b, c):
	return 2 * (min(a, b) + c) + int(a != b)
print(f(*[int(i) for i in input().split(' ')]))


import sys
input = sys.stdin.readline
mii = lambda : map(int, input().split())
(a, b, c) = mii()
d = min(a, b)
a -= d
b -= d
c += d
print(c * 2 + min(1, max(a, b)))


(a, b, c) = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
print(2 * c + min(a, b) + min(max(a, b), min(a, b) + 1))


(a, b, ab) = (int(x) for x in input().split())
ans = 0
c = min(a, b)
if b - c > 0 or a - c > 0:
	ans += 1
ans += 2 * ab + 2 * c
print(ans)


ii = lambda : int(input())
mi = lambda : map(int, input().split())
li = lambda : list(mi())
si = lambda : input()
msi = lambda : map(int, stdin.readline().split())
lsi = lambda : list(msi())
(a, b, c) = li()
ans = 2 * c
if b > a:
	ans = ans + (2 * a + 1)
elif a == b:
	ans = ans + 2 * a
else:
	ans += 2 * b + 1
print(ans)


(x, y, z) = map(int, input().split())
c = 0
if x == y:
	print(x + y + 2 * z)
else:
	print((min(x, y) + z) * 2 + 1)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
leng = 0
leng = leng + 2 * c
if a > b:
	g = a
	s = b
else:
	g = b
	s = a
leng = leng + 2 * s + int(g > s)
print(leng)


(a, b, c) = map(int, input().split(' '))
if a == b or abs(a - b) == 1:
	sum1 = a + b + 2 * c
	print(sum1)
if a < b:
	if a != b and abs(a - b) >= 2:
		sum1 = a + a + 1 + 2 * c
		print(sum1)
elif a > b:
	if a != b and abs(a - b) >= 2:
		sum1 = b + b + 1 + 2 * c
		print(sum1)


def main():
	buf = input()
	buflist = buf.split()
	A = int(buflist[0])
	B = int(buflist[1])
	C = int(buflist[2])
	length = 2 * C
	length += 2 * min(A, B)
	u = min(A, B)
	A -= u
	B -= u
	if A > 0 or B > 0:
		length += 1
	print(length)
main()


from math import *
(a, b, c) = map(int, input().split(' '))
s = 2 * c
t = 0
ans = 0
if b > a:
	ans = max(ans, s + (2 * a + 1))
else:
	ans = max(ans, s + 2 * b)
if a > b:
	ans = max(ans, s + (2 * b + 1))
else:
	ans = max(ans, s + 2 * a)
print(ans)


(a, b, c) = map(int, input().strip().split())
x = max(a, b) - min(a, b)
y = 2 * min(a, b) if x == 0 else 2 * min(a, b) + 1
print(2 * c + y)


(a, b, c) = [int(x) for x in input().split()]
flag = 0
if a == 0 and b != 0 or (a != 0 and b == 0):
	print(2 * c + 1)
	flag = 1
if flag == 0:
	if abs(a - b) < 2:
		print(a + b + 2 * c)
	else:
		small = min(a, b)
		print(2 * small + 2 * c + 1)


import sys
import math
input = sys.stdin.readline
sys.setrecursionlimit(100000)

def getN():
	return int(input())

def getList():
	return list(map(int, input().split()))
(a, b, c) = getList()
print((c + min(a, b)) * 2 + (a != b))


inp = lambda cast=int: list(map(cast, input().split()))
printf = lambda s='', *args, **kwargs: print(str(s).format(*args), flush=True, **kwargs)
(a, b, ab) = inp()
res = min(a, b) * 2 + int(a != b) + ab * 2
print(res)


(a, b, ab) = map(int, input().split())
x = min(a, b)
result = (ab + x) * 2
if x < a:
	result += 1
if x < b:
	result += 1
print(result)


s = [int(i) for i in input().split(' ')]
if s[0] == s[1]:
	print((s[0] + s[-1]) * 2)
else:
	print(min(s[0], s[1]) * 2 + 1 + s[-1] * 2)


from collections import Counter
gi = lambda : list(map(int, input().strip().split()))
(a, b, ab) = gi()
ans = 2 * min(a, b) + 1 if a != b else 2 * min(a, b)
ans += ab * 2
print(ans)


a = input().split()
a1 = int(a[0])
a2 = int(a[1])
a3 = int(a[2])
ans = 0
ans += 2 * a3 + 2 * min(a1, a2)
k = min(a1, a2)
a1 -= k
a2 -= k
if a1 == 0 and a2 == 0:
	print(ans)
else:
	print(ans + 1)


def main():
	(a, b, c) = map(int, input().split(' '))
	op = 0
	op += c * 2
	mini = min(a, b)
	if mini == 0:
		op += 1
	else:
		op += 2 * mini
		if a != b:
			op += 1
	print(op)
main()


(a, b, c) = map(int, input().split())
d = min(a, b)
e = max(a, b)
print(2 * c + 2 * d + min(1, e - d))


(a, b, c) = input().split()
(a, b, c) = (eval(a), eval(b), eval(c))
if a - b > 1:
	a = 2 * b + 2 * c + 1
elif b - a > 1:
	a = 2 * a + 2 * c + 1
else:
	a = a + b + 2 * c
print(a)


(a, b, c) = map(int, input().split())
ans = 2 * c
if a == b:
	ans += a + b
elif a % 2 == 0 and b % 2 == 0:
	ans += min(a, b) * 2 + 1
else:
	ans += min(a, b) * 2 + 1
print(ans)


def fun(a, b, c):
	l = 2 * min(a, b)
	if abs(a - b):
		l += 1
	return l + 2 * c
x = list(map(int, input().split()))
print(fun(x[0], x[1], x[2]))


(x, y, z) = list(map(int, input().split()))
if x == y and y == z:
	print(z * 2 + x + y)
elif x == y:
	print(z * 2 + min(x, y) * 2)
else:
	print(z * 2 + min(x, y) * 2 + 1)


(n, m, k) = map(int, input().split())
if n != m:
	print(min(n, m) * 2 + 1 + 2 * k)
else:
	print(n * 2 + 2 * k)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
sub = 0
min = a
if a > b:
	min = b
	sub = int(a) - int(b)
elif b > a:
	min = a
	sub = int(b) - int(a)
if sub > 1:
	sub = 1
print(2 * c + 2 * min + sub)


import math
from collections import deque, defaultdict
from sys import stdin, stdout
input = stdin.readline
listin = lambda : list(map(int, input().split()))
mapin = lambda : map(int, input().split())
(a, b, c) = mapin()
print(2 * min(a, b) + 2 * c + (abs(a - b) > 0))


z = input().split()
giv = list(map(int, z))
a = giv[0]
b = giv[1]
c = giv[2]
d = 1
if a == b:
	d = 0
ans = c * 2 + 2 * min(a, b) + d
print(ans)


pa = input()
p = pa.split()
a = int(p[0])
b = int(p[1])
c = int(p[2])
if a == b:
	print(2 * (a + c))
elif a > b:
	print(2 * (b + c) + 1)
else:
	print(2 * (a + c) + 1)


inputs = list(map(int, input().split()))
res = 2 * inputs[2] + 2 * min(inputs[0], inputs[1])
if inputs[0] == inputs[1]:
	print(res)
else:
	print(res + 1)


def main():
	(a, b, c) = input().split(' ')
	a = int(a)
	b = int(b)
	c = int(c)
	if a != b:
		print(2 * c + 2 * min(a, b) + 1)
	else:
		print(2 * c + 2 * min(a, b))
main()


(a, b, c) = map(int, input().split())
x = min(a, b, c)
a -= x
b -= x
c -= x
if c == 0:
	y = min(a, b)
	a -= y
	b -= y
	if a != 0 or b != 0:
		print(x * 4 + y * 2 + 1)
	else:
		print(x * 4 + y * 2)
elif a != 0 or b != 0:
	print(x * 4 + c * 2 + 1)
else:
	print(x * 4 + c * 2)


(a, b, c) = map(int, input().split())
m = min(a, b)
if a != b:
	s = 2 * c + 2 * m + 1
else:
	s = 2 * c + 2 * m
print(s)


import sys
import math
import os
import itertools
import string
import heapq
import _collections
from collections import Counter
from collections import defaultdict
from functools import lru_cache
import bisect
import re
import queue
from decimal import *

class Scanner:

	@staticmethod
	def int():
		return int(sys.stdin.readline().rstrip())

	@staticmethod
	def string():
		return sys.stdin.readline().rstrip()

	@staticmethod
	def map_int():
		return [int(x) for x in Scanner.string().split()]

	@staticmethod
	def string_list(n):
		return [input() for i in range(n)]

	@staticmethod
	def int_list_list(n):
		return [Scanner.map_int() for i in range(n)]

	@staticmethod
	def int_cols_list(n):
		return [int(input()) for i in range(n)]

class Math:

	@staticmethod
	def gcd(a, b):
		if b == 0:
			return a
		return Math.gcd(b, a % b)

	@staticmethod
	def lcm(a, b):
		return a * b // Math.gcd(a, b)

	@staticmethod
	def divisor(n):
		res = []
		i = 1
		for i in range(1, int(n ** 0.5) + 1):
			if n % i == 0:
				res.append(i)
				if i != n // i:
					res.append(n // i)
		return res

	@staticmethod
	def round_up(a, b):
		return -(-a // b)

	@staticmethod
	def is_prime(n):
		if n < 2:
			return False
		if n == 2:
			return True
		if n % 2 == 0:
			return False
		d = int(n ** 0.5) + 1
		for i in range(3, d + 1, 2):
			if n % i == 0:
				return False
		return True

def pop_count(x):
	x = x - (x >> 1 & 6148914691236517205)
	x = (x & 3689348814741910323) + (x >> 2 & 3689348814741910323)
	x = x + (x >> 4) & 1085102592571150095
	x = x + (x >> 8)
	x = x + (x >> 16)
	x = x + (x >> 32)
	return x & 127
MOD = int(1000000000.0) + 7
INF = int(1000000000000000.0)

def isOK(A):
	A.sort()
	for i in range(len(A) - 1):
		if A[i] + 1 != A[i + 1]:
			return False
	return True

def func(x):
	return 1

def solve():
	(a, b, c) = Scanner.map_int()
	ans = c * 2
	m = min(a, b)
	ans += m * 2
	a -= m
	b -= m
	if a > 0 or b > 0:
		ans += 1
	print(ans)

def main():
	solve()
main()


(a, b, c) = list(map(int, input().split()))
j = 2 * c + min(a, b) + min(max(a, b), min(a, b) + 1)
print(j)


(a, b, c) = map(int, input().split())
t = 0
if abs(a - b) > 0:
	t = 1
print(2 * c + min(a, b) * 2 + t)


import sys
input = sys.stdin.readline
(a, b, c) = map(int, input().split())
length = 2 * c
s = min(a, b)
length += 2 * s
a -= s
b -= s
if b > 0:
	length += 1
	b -= 1
if a > 0:
	length += 1
	a -= 1
print(length)


(a, b, c) = [int(x) for x in input().strip().split()]
res = c * 2
if a == b:
	m = 2 * a
else:
	m = min(a, b)
	m = 2 * m + 1
res += m
print(res)


d = input()
e = d.split()
a = int(e[0])
b = int(e[1])
c = int(e[2])
if a == b:
	ans = 2 * a + 2 * c
else:
	ans = 2 * min(a, b) + 1 + 2 * c
print(ans)


(a, b, c) = list(map(int, input().split()))
print(2 * c + 2 * min(a, b) + (a != b))


(x, y, z) = map(int, input().split())
ans = 0
ans += 2 * z + 2 * min(y, x)
f = min(y, x)
y = y - f
x = x - f
print(ans + min(1, max(y, x)))


(a, b, c) = map(int, input().split())
d = c * 2
e = min(a, b)
d += e * 2
if b > a or a > b:
	d += 1
print(d)


import math
(a, b, c) = list(map(lambda x: int(x), input().split(' ')))
if a == b:
	res = a * 2 + c * 2
else:
	res = min(a, b) * 2 + c * 2 + 1
print(res)


def mp():
	return map(int, input().split())
(a, b, c) = mp()
print(min(a, b) * 2 + int(b != a) + c * 2)


(a, b, c) = (int(tmp) for tmp in input().split())
ans = 0
if a > b:
	ans = ans + 2 * b + 2 * c + 1
elif b > a:
	ans = ans + 2 * a + 2 * c + 1
elif a == b:
	ans = ans + 2 * a + 2 * c
print(ans)


def min(a, b):
	if a < b:
		return a
	else:
		return b

def abs(a, b):
	if a - b < 0:
		return -1 * (a - b)
	else:
		return a - b
(a, b, c) = map(int, input().split())
if abs(a, b) <= 1:
	print(b + a + 2 * c)
else:
	print(int(min(2 * a + 1, 2 * b + 1) + 2 * c))


(a, b, c) = map(int, input().split())
total = 2 * c
high = max(a, b)
low = min(a, b)
if high >= low + 1:
	total += 2 * low + 1
else:
	total += 2 * low
print(total)


(a, b, c) = map(int, input().split())
mn = min(a, b)
mx = max(a, b)
if mx > mn + 1:
	mx = mn + 1
print(mn + mx + 2 * c)


def max_len(a, b, c):
	if a == b:
		return a + b + 2 * c
	elif b > a:
		return 2 * a + 1 + 2 * c
	else:
		return 2 * b + 1 + 2 * c
print(max_len(*map(int, input().rstrip().split())))


d = [int(i) for i in input().split()]
print(min(d[0], d[1] + 1) + min(d[1], d[0] + 1) + 2 * d[2])


from collections import deque
t = 1
for test in range(t):
	(a, c, b) = map(int, input().split())
	ans = 2 * b
	if a == c:
		ans += 2 * a
	elif a < c:
		ans += 2 * a + 1
	else:
		ans += 2 * c + 1
	print(ans)


(a, b, ab) = list(map(int, input().split()))
if not b == a:
	print(2 * min(a, b) + 1 + 2 * ab)
else:
	print(2 * min(a, b) + 2 * ab)


(a, b, c) = map(int, input().split())
total = 0
if a == b:
	total = a + b + 2 * c
elif a > b:
	total = 1 + 2 * min(a - 1, b) + 2 * c
else:
	total = 1 + 2 * min(a, b - 1) + 2 * c
print(total)


(a, b, c) = map(int, input().split())
a1 = min(a, b)
x = 0
if b - a >= 1 or a - b >= 1:
	x = 1
print(int(2 * a1 + 2 * c + x))


q = 1
for i in range(q):
	(a, b, c) = map(int, input().split())
	ans = 2 * c
	l = [a, b]
	l.sort()
	ans += 2 * l[0]
	l[1] -= l[0]
	if l[1] > 0:
		ans += 1
	print(ans)


import math
import sys
get_int_list = lambda : list(map(int, sys.stdin.readline().strip().split()))
Input = sys.stdin.readline
(a, b, c) = map(int, input().split())
a = a + c
b = b + c
if a > b:
	print(b * 2 + 1)
elif b > a:
	print(a * 2 + 1)
else:
	print(a * 2)


import math
(x, y, z) = input().split()
x = int(x)
y = int(y)
z = int(z)
if x > y:
	t = y
	rem = x - y
else:
	t = x
	rem = y - x
if rem == 0:
	print(2 * (x + z))
else:
	print(2 * (t + z) + 1)


a = list(map(lambda x: int(x), input().split()))
answer = a[2] * 2 + min(a[0], a[1]) * 2
if a[0] != a[1]:
	answer += 1
print(answer)


(a, b, c) = map(int, input().split())
add = 0
if a - b != 0:
	add = 1
leng = c * 2 + 2 * min(a, b) + add
print(leng)


(a, b, c) = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
t = 2 * c
if a > b:
	s = b * 2
else:
	if a == b:
		s = a * 2
	if b > a:
		s = a * 2
t = t + s
if a - b > 0 or b - a > 0:
	print(t + 1)
else:
	print(t)


t = 1
for i in range(t):
	(a, b, c) = list(map(int, input().split()))
	print(2 * c + 2 * min(a, b) + (a != b))


(a, b, k) = list(map(int, input().split()))
if a == b:
	print(a + b + 2 * k)
else:
	y = [a, b]
	y.sort()
	print(y[0] + y[0] + 1 + k * 2)


import math
mod = 1000000007

def power(a, b):
	res = 1
	b = b % (mod - 1)
	while b > 0:
		if b % 2 != 0:
			res = res % mod * (a % mod) % mod
		b = b // 2
		a = a % mod
		a = a * a % mod
	res = res % mod
	return res
(a, b, c) = [int(i) for i in input().split()]
s = 2 * c
if a > b:
	s = s + 2 * b + 1
elif b > a:
	s = s + 2 * a + 1
else:
	s = s + 2 * a
print(s)


def answer():
	a = [int(x) for x in input().split()]
	print(2 * (min(a[0], a[1]) + a[2]) + (abs(a[0] - a[1]) >= 1))
answer()


(a, b, c) = map(int, input().split())
z1 = a + c
z2 = b + c
if z1 == z2:
	k = min(z1, z2)
else:
	k = min(z1, z2) + 1
print(min(z1, z2) + k)


(a, b, ab) = map(int, input().split())
if a == b and b == ab:
	print(4 * a)
else:
	ans = 0
	if a <= b:
		ans = 2 * a
	else:
		ans = 2 * b
	ans = ans + 2 * ab
	if a != b:
		print(ans + 1)
	else:
		print(ans)


import sys
import math
fileoperation = 0
if fileoperation:
	orig_stdout = sys.stdout
	orig_stdin = sys.stdin
	inputfile = open('W:/Competitive Programming/input.txt', 'r')
	outputfile = open('W:/Competitive Programming/output.txt', 'w')
	sys.stdin = inputfile
	sys.stdout = outputfile
mod = 1000000007

def nospace(l):
	ans = ''.join((str(i) for i in l))
	return ans
t = 1
for tt in range(t):
	(a, b, c) = map(int, sys.stdin.readline().split(' '))
	if a == b:
		print(a + b + 2 * c)
	elif a > b:
		print(b + b + 1 + 2 * c)
	else:
		print(a + a + 1 + 2 * c)
if fileoperation:
	sys.stdout = orig_stdout
	sys.stdin = orig_stdin
	inputfile.close()
	outputfile.close()


(a, b, c) = map(int, input().split())
a1 = a + c
b1 = b + c
if a1 > b1:
	print(2 * b1 + 1)
elif b1 > a1:
	print(2 * a1 + 1)
else:
	print(2 * a1)


(a, b, ab) = [int(i) for i in input().split()]
print(min(a, b) * 2 + 2 * ab + 1 if b != a else min(a, b) * 2 + 2 * ab)


s = input()
L = s.split(' ')
la = int(L[0])
lb = int(L[1])
lc = int(L[2])
if la == lb:
	res = 0
else:
	res = 1
print(2 * int(lc) + 2 * min(la, lb) + res)


(a, b, ab) = [int(i) for i in input().split()]

def ab_(a, b, ab):
	return 2 * ab + min(a, b) * 2 + (a > b)

def ba_(a, b, ab):
	if b < 1:
		return 0
	return 1 + 2 * ab + min(a, b - 1) * 2 + (a > b - 1)
print(max(ab_(a, b, ab), ba_(a, b, ab)))


abc = list(map(int, input().split()))
if abc[0] > abc[1] or abc[1] > abc[0]:
	print(2 * min(abc[0], abc[1]) + 1 + 2 * abc[2])
else:
	print(2 * abc[0] + 2 * abc[2])


(a, b, c) = list(map(int, input().split()))
if b - a >= 2 or a - b >= 2:
	print(c * 2 + a + b - (abs(a - b) - 1))
else:
	print(c * 2 + a + b)


(x, y, z) = [int(i) for i in input().split()]
if x < y:
	(x, y) = (y, x)
if x == y:
	print(x + y + z * 2)
else:
	print(2 * y + 1 + z * 2)


import math
(a, b, c) = map(int, input().split())
if abs(b - a) == 0 or abs(b - a) == 1:
	print(2 * c + b + a)
else:
	if b > a:
		b = a + 1
	else:
		a = b + 1
	print(2 * c + a + b)


(a, b, c) = map(int, input().split())
a = a + c
b = b + c
if a > b:
	m = b
	m = 2 * b + 1
else:
	m = 2 * a
	if b - a > 0:
		m = 2 * a + 1
print(m)


def solution(a, b, c):
	return c * 2 + min(a, b) * 2 + (1 if a != b else 0)

def read_ints():
	return map(int, input().split())

def read_list():
	return list(read_ints())
(a, b, c) = read_ints()
print(solution(a, b, c))


ll = lambda : list(map(int, input().split()))
testcases = 1
for testcase in range(testcases):
	[a, b, c] = ll()
	ans = 2 * c
	if a == b:
		ans += a + b
	else:
		ans += 2 * min(a, b) + 1
	print(ans)


abc = list(map(int, input().split()))
a = abc[0]
b = abc[1]
c = abc[2]
if abs(a - b) > 1:
	ans = a + b + 2 * c - abs(a - b) + 1
else:
	ans = a + b + 2 * c
print(ans)


first = list(map(int, input().split()))
if first[1] - first[0] > 1 or first[0] - first[1] > 1:
	print(first[0] + first[1] + first[2] * 2 - (abs(first[1] - first[0]) - 1))
else:
	print(first[0] + first[1] + first[2] * 2)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
ans = 2 * c
if a < b:
	d = a
else:
	d = b
ans = 2 * c + 2 * d
b = b - d
a = a - d
if b == 0 and a != 0 or (b != 0 and a == 0):
	ans += 1
print(ans)


inp = input()
inp = inp.split(' ')
a_value = int(inp[0])
b_value = int(inp[1])
ab_value = int(inp[2])
sum_of_vals = 0
if abs(a_value - b_value) >= 2:
	sum_of_vals += 2 * min(a_value, b_value) + 1
else:
	sum_of_vals += a_value + b_value
sum_of_vals += 2 * ab_value
print(sum_of_vals)


(a, b, c) = [int(o) for o in input().split()]
k = c * 2
if a == b:
	k = k + a * 2
	print(k)
else:
	p = min(a, b)
	k = k + p * 2 + 1
	print(k)


(a, b, ab) = map(int, input().split())
if a > b:
	print(ab * 2 + b * 2 + 1)
elif b > a:
	print(ab * 2 + a * 2 + 1)
else:
	print(ab * 2 + a * 2)


t = [int(x) for x in input().split(' ')]
num = t[2] + min(t[0], t[1])
f = num * 2
if t[0] != t[1]:
	f += 1
print(f)


(a, b, ab) = map(int, input().split(' '))
ab = 2 * ab
x = a + b
if abs(a - b) >= 2:
	x = a + b - abs(a - b) + 1
print(x + ab)


(a, b, c) = map(int, input().split(' '))
l = 0
l += c * 2
x = min(a, b)
l += x * 2
if abs(a - b) > 0:
	l += 1
print(l)


(a, b, c) = [int(x) for x in input().split(' ')]
temp = min(a, b)
a = a - temp
b = b - temp
c = c + temp
print(2 * c + (1 if a or b else 0))


def so(a):
	if a[0] == a[1]:
		return 2 * (a[0] + a[2])
	else:
		return 2 * min(a[0], a[1]) + 1 + 2 * a[2]
a = [int(x) for x in input().split()]
print(so(a))


def smallest(a, b):
	if a <= b:
		return a
	else:
		return b
(a, b, c) = map(int, input().split())
ans = c * 2 + smallest(a, b) * 2
if a == b:
	print(ans)
else:
	print(ans + 1)


def smaller(x, y):
	if x < y:
		return x
	return y

def larger(x, y):
	if x > y:
		return x
	return y
(A, B, C) = map(int, input().split())
S = smaller(A, B)
L = larger(A, B)
flag = 0
if L - S != 0:
	flag = 1
print(2 * (C + smaller(A, B)) + flag)


import math
(a, b, c) = map(int, input().split())
if abs(b - a) < 2:
	d = 2 * c + a + b
	print(d)
else:
	e = 2 * c + 2 * min(a, b) + 1
	print(e)


a_b_c = input().split(' ')
a_b_c = [int(a_b_c[i]) for i in (0, 1, 2)]
a = a_b_c[0]
b = a_b_c[1]
c = a_b_c[2]
answer = c * 2
if a < b:
	answer += 2 * a + 1
elif a > b:
	answer += 2 * b + 1
else:
	answer += 2 * a
print(answer)


(a, b, c) = map(int, input().split())
d = min(a, b, c) * 4
if a == b == c:
	d = a * 4
elif a == min(a, b, c):
	if b - min(a, b, c) > 0:
		d += (c - min(a, b, c)) * 2 + 1
	else:
		d += (c - min(a, b, c)) * 2
elif b == min(a, b, c):
	if a - min(a, b, c) > 0:
		d += (c - min(a, b, c)) * 2 + 1
	else:
		d += (c - min(a, b, c)) * 2
elif a == b or abs(a - b) < 1:
	d += (a - min(a, b, c)) * 2
elif a > b:
	d += (b - min(a, b, c)) * 2 + 1
else:
	d += (a - min(a, b, c)) * 2 + 1
print(d)


lst = list(map(int, input().split(' ')))
a = lst[0]
b = lst[1]
ab = lst[2]
c = min(a, b)
result = ab * 2 + c * 2
a -= c
b -= c
if a > 0:
	result += 1
if b > 0:
	result += 1
print(result)


def solve(a, b, c):
	return 2 * c + min(a, b) + min(max(a, b), min(a, b) + 1)
[a, b, c] = [int(x) for x in input().split()]
print(solve(a, b, c))


n = list(map(int, input().split()))
if n[0] == n[1]:
	print(2 * n[2] + 2 * n[0])
elif n[0] != n[1]:
	print(2 * n[2] + min(n[0], n[1]) + (min(n[0], n[1]) + 1))


import sys
lne = [int(i) for i in sys.stdin.readline().rstrip().split(' ')]
m = min(lne)
num = 4 * m
lne = [i - m for i in lne]
if lne[0] and lne[1]:
	m = sorted(lne)[1]
	num += 2 * m
	if lne[1] != lne[0]:
		num += 1
	lne = [max(i - m, 0) for i in lne]
elif lne[1] and lne[2] or (lne[0] and lne[2]):
	num += 2 * lne[2] + 1
elif lne[2]:
	num += 2 * lne[2]
elif lne[0] or lne[1]:
	num += 1
print(num)


(a, b, c) = map(int, input().split())
n = a + c
m = b + c
min = min(n, m)
max = max(n, m)
if max > min + 1:
	print(2 * min + 1)
else:
	print(min + max)


import sys, math, string
input = sys.stdin.readline
from collections import deque
L = lambda : list(map(int, input().split()))
Ls = lambda : list(input().split())
M = lambda : map(int, input().split())
(a, b, c) = M()
x = a - min(a, b)
y = b - min(a, b)
p = 0
if x >= 1 or y >= 1:
	p = 1
print(c * 2 + 2 * min(a, b) + p)


def solve():
	(a, b, c) = map(int, input().split())
	print(c * 2 + min(a, b) * 2 + (1 if a != b else 0))
solve()


(a, b, c) = map(int, input().split())

def longest_word(x, y, z):
	if x > y:
		return y + y + 1 + z * 2
	elif x < y:
		return x + x + 1 + z * 2
	elif x == y:
		return x + y + z * 2
print(longest_word(a, b, c))


from sys import stdin, stdout
(a, b, c) = map(int, stdin.readline().split())
length = 2 * c
A = min(a, b)
a -= A
b -= A
length += 2 * A
if b > 0 or a > 0:
	length += 1
stdout.write(str(length) + '\n')


import math
(x, y, z) = input().split()
x = int(x)
y = int(y)
z = int(z)
ans = 2 * z + 2 * min(x, y)
if max(x, y) != min(x, y):
	ans += 1
print(ans)


it = list(map(int, input().split()))
ll = min(it[0], it[1])
it[0] -= ll
it[1] -= ll
k = it[0] > 0
l = it[1] > 0
n = it[2] * 2
n += ll * 2
if k:
	n += 1
if l:
	n += 1
print(n)


from math import *
(a, b, c) = map(int, input().split())
print((c + min(a, b)) * 2 + min(1, max(a, b) - min(a, b)))


def dust(ls):
	c = 2 * ls[2]
	if abs(ls[0] - ls[1]) == 1 or abs(ls[0] - ls[1]) == 0:
		c = c + ls[0] + ls[1]
	else:
		c = c + 2 * min(ls[0], ls[1]) + 1
	return c
ls = [int(i) for i in input().split()]
print(dust(ls))


(a, b, c) = (int(x) for x in input().split(' '))
g = int(min(a, b))
a -= g
b -= g
c += g
l = c * 2
if a > 0 or b > 0:
	l += 1
print(l)


(a, b, c) = map(int, input().split())
x = min(a, b)
c += x
a -= x
b -= x
print(2 * c + int(a != b))


(a, b, ab) = map(int, input().split(' '))
p = min(a, b)
net = 2 * ab + 2 * p
a = a - p
b = b - p
if a == b:
	print(net)
else:
	print(net + 1)


from math import ceil

def main():
	(n, m, k) = [int(v) for v in input().split()]
	s = k * 2 + min(n, m) * 2 + (1 if m != n else 0)
	print(s)
main()


import sys
inf = float('inf')
abc = 'abcdefghijklmnopqrstuvwxyz'
abd = {'a': 0, 'b': 1, 'c': 2, 'd': 3, 'e': 4, 'f': 5, 'g': 6, 'h': 7, 'i': 8, 'j': 9, 'k': 10, 'l': 11, 'm': 12, 'n': 13, 'o': 14, 'p': 15, 'q': 16, 'r': 17, 's': 18, 't': 19, 'u': 20, 'v': 21, 'w': 22, 'x': 23, 'y': 24, 'z': 25}
(mod, MOD) = (1000000007, 998244353)
vow = ['a', 'e', 'i', 'o', 'u']
(dx, dy) = ([-1, 1, 0, 0], [0, 0, 1, -1])

def get_array():
	return list(map(int, sys.stdin.readline().strip().split()))

def get_ints():
	return map(int, sys.stdin.readline().strip().split())

def input():
	return sys.stdin.readline().strip()
(a, b, ab) = get_ints()
total = min(a, b) * 2 + ab * 2
if a < b or a > b:
	total += 1
print(total)


def fastio():
	import sys
	from io import StringIO
	from atexit import register
	global input
	sys.stdin = StringIO(sys.stdin.read())
	input = lambda : sys.stdin.readline().rstrip('\r\n')
	sys.stdout = StringIO()
	register(lambda : sys.__stdout__.write(sys.stdout.getvalue()))
fastio()
MOD = 10 ** 9 + 7
I = lambda : list(map(int, input().split()))
from math import gcd
from collections import defaultdict as dd, Counter as C
(a, b, c) = I()
ans = 2 * c + 2 * min(a, b)
if a != b:
	ans += 1
print(ans)


(a, b, c) = map(int, input().split())
x = min(a, b)
length = x * 2
length += c * 2
if x < a or x < b:
	length += 1
print(length)


import math

def solve():
	(a, b, c) = map(int, input().split())
	print(2 * c + 2 * min(a, b) + (a != b))

def main():
	t = 1
	for _ in range(t):
		solve()
main()


(a, b, c) = [int(x) for x in input().split()]
ats = c * 2
ats += min(a, b) * 2 + int(a != b)
print(ats)


line = input().split(' ')
a = int(line[0])
b = int(line[1])
c = int(line[2])
sum = 2 * c
sum += 2 * min(a, b)
m = min(a, b)
a -= m
b -= m
if a > 0 or b > 0:
	sum += 1
print(sum)


IL = lambda : list(map(int, input().split()))
(a, b, c) = IL()
c += min(a, b)
print(c * 2 + (a != b))


(a, b, c) = [int(x) for x in input().split()]
res = 2 * c + 2 * min(a, b)
if a != b:
	res += 1
print(res)


(a, b, ac) = map(int, input().split())
j = 2 * ac
j += 2 * min(a, b)
if a - min(a, b) != 0 or b - min(a, b) != 0:
	j += 1
print(j)


def maxLen(a, b, c):
	smallest = a if a <= b else b
	extra = 0
	if a - b != 0:
		extra = 1
	final = c * 2 + smallest * 2 + extra
	return final
[a, b, c] = list(map(int, input().split()))
print(maxLen(a, b, c))


import math
import sys
(a, b, c) = map(int, input().split())
print(2 * c + 2 * min(a, b) + (1 if a != b else 0))


(a, b, c) = map(int, input().split())
ans = 0
if a > b:
	ans += b * 2 + 1
	ans += c * 2
elif a == b:
	ans += a * 2
	ans += c * 2
else:
	ans += a * 2 + 1
	ans += c * 2
print(str(ans), end='')


(x, y, z) = map(int, input().split())
a = x + z
b = y + z
diff_a = a - b
diff_b = b - a
if a > b and diff_a > 1:
	print(2 * b + 1)
elif b > a and diff_b > 1:
	print(2 * a + 1)
else:
	print(a + b)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
if a == b:
	l_of_string = c * 2 + min(a, b) * 2
else:
	l_of_string = c * 2 + min(a, b) * 2 + 1
print(l_of_string)


s = str(input()).split()
a = int(s[0])
b = int(s[1])
c = int(s[2])
if a == b:
	print(a + b + 2 * c)
else:
	print(2 * min(a, b) + 2 * c + 1)


p = input().rstrip().split(' ')
A = int(p[0])
B = int(p[1])
C = int(p[2])
t = min(A, B) * 2 + C * 2
if A != B:
	print(t + 1)
else:
	print(t)


def x(a, b, c):
	res = 2 * (c + min(a, b))
	if abs(a - b):
		res += 1
	print(res)
(a, b, c) = list(map(int, input().split()))
x(a, b, c)


(a, b, c) = map(int, input().strip().split())
if a > b:
	print(2 * c + 2 * b + 1)
if a < b:
	print(2 * c + 2 * a + 1)
if a == b:
	print(2 * c + 2 * a)


(a, b, c) = [int(x) for x in input().split()]
t = a
if a > b:
	t = b
x = 2 * (c + t)
if a - t > 0 or b - t > 0:
	x += 1
print(x)


from math import *

def solve():
	(a, b, c) = [int(x) for x in input().split()]
	return 2 * c + min(a, b) * 2 + (0 if a == b else 1)
print(solve())


(a, b, c) = map(int, input().strip().split())
answer = 2 * c + 2 * min(a, b)
if a == b:
	print(answer)
else:
	print(answer + 1)


import sys

class AAnotherOneBitesTheDust:

	def solve(self):
		(a, b, c) = [int(_) for _ in input().split()]
		print(2 * c + 2 * min(a, b) + int(a != b))
solver = AAnotherOneBitesTheDust()
input = sys.stdin.readline
solver.solve()


n = input()
n = n.split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
if a > b:
	x = 2 * c + b * 2 + 1
	print(x)
elif b > a:
	x = 2 * c + a * 2 + 1
	print(x)
else:
	x = 2 * c + a + b
	print(x)


import sys
import math
input = sys.stdin.readline

def inp():
	return int(input())

def inara():
	return list(map(int, input().split()))

def insr():
	s = input()
	return list(s[:len(s) - 1])

def invr():
	return map(int, input().split())
(a, b, c) = invr()
ans = c * 2
temp = min(a, b)
ans += temp + temp
a -= temp
b -= temp
if b:
	ans += 1
if a:
	ans += 1
print(ans)


(a, b, c) = map(int, input().split())
count = min(a, b)
count2 = max(a, b)
add = 0
if count2 > count:
	add = 1
print(count * 2 + add + c * 2)


import math
a = [int(i) for i in input().split()]
if math.fabs(a[0] - a[1]) <= 1:
	print(2 * a[2] + (a[0] + a[1]))
else:
	print(2 * a[2] + 2 * min(a[0], a[1]) + 1)


array = input()
(a, b, c) = [int(x) for x in array.split(' ')]
res = c * 2
m = min(a, b)
res += 2 * m
a -= m
b -= m
if a > 0 or b > 0:
	res += 1
print(res)


xyz = input().split()
x = int(xyz[0])
y = int(xyz[1])
z = int(xyz[2])
a = x + z
b = y + z
if a == b or b == a + 1:
	print(a + b)
else:
	s = b - a
	if s < 0:
		s = -s
	print(a + b - (s - 1))


a = list(map(int, input().split()))
if a[1] - a[0] > 1:
	a[1] = a[0] + 1
if a[0] - a[1] > 1:
	a[0] = a[1] + 1
print(a[0] + a[1] + 2 * a[2])


n = list(map(int, input().split()))
a = n[0]
b = n[1]
c = n[2]
k = 0
if b > a:
	k = 2 * (c + a)
else:
	k = 2 * (c + b)
if a == b:
	print(k)
else:
	print(k + 1)


s = [int(i) for i in input().split(' ')]
a = s[0]
b = s[1]
c = s[2]
t = 0
if a != b:
	t = 1
else:
	t = 0
print(2 * c + 2 * min(a, b) + t)


import math
(a, b, c) = map(int, input().split())
s = 2 * min(a, b) + 2 * c
if a != b:
	s += 1
print(s)


import sys
line = sys.stdin.readline().split()
(a, b, c) = (int(line[0]), int(line[1]), int(line[2]))
max_l = c * 2 + 2 * min(a, b)
if a != b and a != 0 and (b != 0):
	max_l += 1
print(max_l)


(a, b, c) = input().split()
a = int(a)
b = int(b)
c = int(c)
print(2 * c + 2 * min(a, b) + (b != a))


(a, b, c) = input().split(' ')
a = int(a)
b = int(b)
c = int(c)
print(2 * c + 2 * min(a, b) + min(abs(a - b), 1))


(a, b, c) = [int(a) for a in input().split()]
if a == b:
	print(a + b + 2 * c)
elif a > b or b > a:
	print(2 * c + 2 * min(a, b) + 1)


k = [*map(int, input().split())]
p = k[2] * 2
if k[0] == k[1] or abs(k[0] - k[1]) == 1:
	print(k[0] + k[1] + p)
else:
	print(k[0] + k[1] + p - abs(k[0] - k[1]) + 1)


(a, b, c) = [int(v) for v in input().split()]
length = c * 2
pairs = max(a, b) - abs(a - b)
unpair = 1 if a != b else 0
print(length + pairs * 2 + unpair)


(a, b, c) = map(int, input().split())
ans = c * 2
ans = ans + min(a, b) * 2
t1 = a - min(a, b)
t2 = b - min(a, b)
if t1 > 0 or t2 > 0:
	print(ans + 1)
else:
	print(ans)


n = list(map(int, input().split()))
a = n[0]
b = n[1]
c = n[2]
MinAB = 0
if abs(a - b) >= 2:
	MinAB = min(a, b)
if MinAB != 0:
	print(MinAB + (MinAB + 1) + c * 2)
else:
	print(a + b + c * 2)


(a, b, c) = map(int, input().split())
a += c
b += c
if a > b:
	a = b + 1
if b > a:
	b = a + 1
print(a + b)


(a, b, c) = map(int, input().split())
count = min(a, b)
res = c * 2 + count * 2 + (1 if a - count > 0 else 0) + (1 if b - count > 0 else 0)
print(res)


from sys import stdin
(a, b, ab) = map(int, stdin.readline().split())
k = min(a, b)
p = ab * 2 + 2 * k
if a - k >= 1 or b - k >= 1:
	p += 1
print(p)


def Dust():
	(a, b, c) = list(map(int, input().split()))
	length = 2 * c + 2 * min(a, b)
	if a == b:
		print(length)
	else:
		print(length + 1)
Dust()


from sys import stdin
from collections import defaultdict as dd
from collections import deque as dq
import itertools as it
from math import sqrt, log, log2
from fractions import Fraction
(a, b, c) = map(int, input().split())
print(c * 2 + min(a, b) * 2 + (1 if a != b else 0))


def max1(a):
	p = a[0]
	for x in a:
		if x > p:
			p = x
	return p

def prlist(a):
	for x in a:
		print(x, end=' ')
(a, b, c) = list(map(int, input().split()))
k = 0
k += 2 * c
if a >= b:
	k += 2 * b
	a -= b
	b = 0
else:
	k += 2 * a
	b -= a
	a = 0
if a > 0 or b > 0:
	k += 1
print(k)


list = arr = [int(i) for i in input().split()]
a = list[0]
b = list[1]
c = list[2]
if a < b:
	print(c * 2 + 2 * a + 1)
elif b < a:
	print(c * 2 + 2 * b + 1)
else:
	print(2 * (c + a))


from math import *
from copy import *
from string import *
from random import *
from sys import stdin
from sys import maxsize
from operator import *
from itertools import *
from collections import Counter
import math

def bin1(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = k ** mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin1(mid + 1, r, k, t, b, val, ans)
		else:
			return bin1(l, mid - 1, k, t, b, val, ans)

def bin2(l, r, k, t, b, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		v = t * k ** mid + b * mid
		if v == val:
			return v
		elif v > val:
			ans = mid
			return bin2(l, mid - 1, k, t, b, val, ans)
		else:
			return bin2(mid + 1, r, k, t, b, val, ans)

def SieveOfEratosthenes(n):
	prime = [True for i in range(n + 1)]
	p = 2
	while p * p <= n:
		if prime[p] == True:
			for i in range(p * p, n + 1, p):
				prime[i] = False
		p += 1
	l = []
	for i in range(2, n + 1):
		if prime[i]:
			l.append(i)
	return l

def bin(l, r, ll, val):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		if val >= ll[mid][0] and val <= ll[mid][1]:
			return mid
		elif val < ll[mid][0]:
			return bin(l, mid - 1, ll, val)
		else:
			return bin(mid + 1, r, ll, val)

def deci(n):
	s = ''
	while n != 0:
		if n % 2 == 0:
			n = n // 2
			s = '0' + s
		else:
			n = n // 2
			s = '1' + s
	return s

def diff(s1, s2):
	if len(s1) < len(s2):
		v = len(s1)
		while v != len(s2):
			s1 = '0' + s1
			v = v + 1
	else:
		v = len(s2)
		while v != len(s1):
			s2 = '0' + s2
			v = v + 1
	c = 0
	for i in range(len(s1)):
		if s1[i:i + 1] != s2[i:i + 1]:
			c = c + 1
	return c
from sys import stdin, stdout

def fac(a, b):
	v = a
	while a != b:
		v *= a - 1
		a = a - 1
	return v

def bino(l, r, n):
	if l > r:
		return -1
	else:
		mid = (l + r) // 2
		val1 = math.log(n / mid + 1, 2)
		val2 = int(val1)
		if val1 == val2:
			return val1
		elif val1 < 1.0:
			return bino(l, mid - 1, n)
		else:
			return bino(mid + 1, r, n)

def binary(l, r, ll, val, ans):
	if l > r:
		return ans
	else:
		mid = (l + r) // 2
		if ll[mid] == val:
			return ll[mid]
		elif ll[mid] < val:
			ans = ll[mid]
			return binary(mid + 1, r, ll, val, ans)
		else:
			return binary(l, mid - 1, ll, val, ans)

def check(n):
	v = 1
	while n != 0:
		if n % 10 == 0 or n % 10 == 1:
			n = n // 10
		else:
			v = 0
			break
	return v
(a, b, ab) = map(int, input().split(' '))
c = 2 * ab
if a == b:
	c += a * 2
elif a > b:
	c += 2 * b + 1
else:
	c += 2 * a + 1
print(c)


import sys
import math
from itertools import permutations
input = sys.stdin.readline
(a, b, c) = map(int, input().split())
minn = min(a, b)
maxx = max(a, b)
if a != b:
	print(2 * c + 2 * minn + 1)
else:
	print(2 * c + 2 * minn)