You are at a water bowling training. There are l people who play with their left hand, r people, who play with their right hand, and a ambidexters, who can play with left or right hand.

The coach decided to form a team of even number of players, exactly half of the players should play with their right hand, and exactly half of the players should play with their left hand. One player should use only on of his hands.

Ambidexters play as well with their right hand as with their left hand. In the team, an ambidexter can play with their left hand, or with their right hand.

Please find the maximum possible size of the team, where equal number of players use their left and right hands, respectively.


-----Input-----

The only line contains three integers l, r and a (0 ≤ l, r, a ≤ 100) — the number of left-handers, the number of right-handers and the number of ambidexters at the training. 


-----Output-----

Print a single even integer — the maximum number of players in the team. It is possible that the team can only have zero number of players.


-----Examples-----
Input
1 4 2

Output
6

Input
5 5 5

Output
14

Input
0 2 0

Output
0



-----Note-----

In the first example you can form a team of 6 players. You should take the only left-hander and two ambidexters to play with left hand, and three right-handers to play with right hand. The only person left can't be taken into the team.

In the second example you can form a team of 14 people. You have to take all five left-handers, all five right-handers, two ambidexters to play with left hand and two ambidexters to play with right hand.

Difficulty: interview

Starter code:

Solutions:
import base64
import zlib
pro = base64.decodebytes("""eJxtUUFuwyAQvPOKVarKkDhOm2MlX/uC3qqqAhs7KBgswGr6+y4QrLqqL7DD7OzMWk2zdQFGGWbu
PVG59N/rdeLhUu6Om95OpVJBumCtXqlCedkFQgalpYcW3twiSS/FMmLxyrWXhKihzGrwXLx0lEHb
QjU4e5HmWgHOgKTwQgC/0p/EIoDeGh96ZRC0szR0F6QPjTI7lt4fCsMuoVCqREGgqqH6qjIxBSZo
cADdTZTXIFie6dCZM8BhDwJOp7SDZuz6zLn3OMXplv+uTKCKwWAdKECDysxLoKzxs1Z4fpRObkb5
6ZfNTDSDbimlAo44+QDPLI4+MzRBYy1Yto0bxPqINTzCOe7uKSsUlQPKFJFzFtmkWlN3dhKcmhpu
2xw05R14FyyG1NSwdQm/QJxwY/+93OKGdA2uRgtt3hPp1RALLjzV2OkYmZSJCB40ku/AISORju2M
XOEPkISOLVzJ/ShtPCedXfwLCdxjfPIDQSHUSQ==
""".encode())
pro = zlib.decompress(pro)
pro = pro.decode()
exec(pro)


l,r,a = map(int,input().split())
l,r = min(l,r),max(l,r)
res = l
if a > r - l:
    res = r + (a - r + l) // 2
else:
    res += a
print(res * 2) 

def read():
    return list(map(int,input().split()))
l,r,a=read()
if r<l:
    l,r=r,l
if l+a<r:
    print((l+a)*2)
else:
    a-=r-l
    print((r+a//2)*2)



l,r,a=list(map(int,input().split()))
s=0
for i in range(a+1):
    s=max(s,2*min(l+i,r+a-i))
print(s)


l, r, a = list(map(int, input().split()))
print(2 * max(min(l + i, r + a - i) for i in range(a + 1)))



l, r, a = map(int, input().split())
print(l + r + a - max(abs(l - r) - a, 0) - (l + r + a - max(abs(l - r) - a, 0)) % 2)

l, r, a = list(map(int, input().split(' ')))

for i in range(a):
    if r < l:
        r += 1
    else:
        l += 1

print(2 * min(l, r))


l, r, a = map(int, input().split())
if l > r: l, r = r, l
if l + a <= r:
    print(2 * (l + a))
else:
    k = r - l
    a -= k
    l += k
    print(2 * l + a - a % 2)

l, r, a = list(map(int, input().split()))

while a > 0:
    if l < r:
        l += 1
    elif r < l:
        r += 1
    else:
        l += 1
    a -= 1

print(2*min(l, r))


l,r,a = list(map(int,input().split()))
if a > (max(l,r)-min(l,r)):
    print((l+a+r)//2*2)
else:
    print((min(l,r)+a) *2)


l, r, a = input().split()
l, r, a = int(l), int(r), int(a)

ans = min([l+a, r+a, int((l+r+a)/2)])
ans*=2

print(ans)

l,r,a = input().split()
l = int(l)
r = int(r)
a = int(a)
d = max(l,r) - min(l,r)
if a<=d:
    ans = 2*(min(l,r)+a)
else:
    a = a-d;
    ans = 2*(max(r,l)+a//2)
print(ans)    

        


l, r, a = map(int, input().split())
l, r = max(l, r), min(l, r)
if l - r >= a:
    print((r + a) * 2)
else:
    print(2 * l + (a - (l - r)) // 2 * 2)

l, r, a = list(map(int, input().split()))

best = 0

for l1 in range(l + 1):
	for r1 in range(r + 1):
		diff = abs(l1 - r1)

		if diff <= a:
			cur_ans = max(l1, r1) * 2 + (a - diff) // 2 * 2
			best = max(cur_ans, best)

print(best)



(l,r,a) = input().split()
l = int(l)
r = int(r)
a = int(a)

dif = abs(r-l)
if (r< l):

    r += min(a, l-r)
    a -= min(a, dif)
else:
    l += min(a, r-l)
    a -= min(a, dif)


if (a > 0):
    print(2*(r + a//2))
else:
    print(2*min(r,l))


l,r,a=list(map(int, input().split()))
l, r = min(l,r), max(l,r)
b = r-l
if b<=a:
    a-=b
    print((r+a//2)*2)
else:
    print((l+a)*2)
    


l, r, a = [int(x) for x in input().split()]
if l > r:
    r, l = l, r

print(2 * (l+a if l+a<r else (l+r+a)//2))


l, r, a = list(map(int, input().split(" ")))
q = min(l,r ) + a
if q < max(l, r):
  print(2*q)
else:
  print(2*(max(l, r) + ((q-max(l, r)) // 2)))



# -*- coding: utf-8 -*-
"""
Created on Fri Mar  9 09:54:56 2018

@author: Nikita
"""

L, R, A = list(map(int, input().split()))
if L <= R:
  if A < R - L:
    print(2 * (L + A))
  else:
    A -= (R - L)
    print(2 * (R + A // 2))
else:
  if A < L - R:
    print(2 * (R + A))
  else:
    A -= (L - R)
    print(2 * (L + A // 2))


l, r, a = map(int, input().split())
l, r = min(l, r), max(l, r)
f = min(r-l, a)
l += f
a -= f
o = l*2 + (a // 2) * 2
print(o)

l, r, a = list(map(int, input().split()))
small, big = sorted((l, r))
if big-small > a:
    print(2* (small+a))
else:
    a-=(big-small)
    print(2*(big + a//2))


l, r, a = list(map(int, input().split()))

if l > r:
    l, r = r, l

b = min(r - l, a)

total = (l + b) * 2 + (a - b) // 2 * 2
print(total)


l, p, a = map(int, input().split());
x = min(l, p);
y = max(l, p);
if (x + a) > y:
    print((l + p + a) // 2 * 2);
else:
    print(2 * (x + a));

s = input().split()
l, r, a = int(s[0]), int(s[1]), int(s[2])
x = min(l, r)
y = max(l, r)
while(a!=0 and x!=y):
    x+=1
    a-=1

print(min(x, y)*2 + a//2*2)

l, r, a = [int(x) for x in input().split()]
maxi = max(l, r)
mini = min(l, r)
while mini!=maxi and a!=0:
    a-=1
    mini+=1
while a//2>0:
    mini+=1
    maxi+=1
    a-=2
maxi=mini
print(mini+maxi)