# coding: utf-8

# Your code here!

# coding: utf-8

from fractions import gcd 

from functools import reduce

import sys

sys.setrecursionlimit(200000000)

from inspect import currentframe





# my functions here!

#標準エラー出力

def printargs2err(*args):

    names = {id(v):k for k,v in currentframe().f_back.f_locals.items()}

    print(', '.join(names.get(id(arg),'???')+' : '+repr(arg) for arg in args),file=sys.stderr)

def debug(x):

    print(x,file=sys.stderr)

def printglobals():

    for (symbol, value) in globals().items():

        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)

def printlocals():

    for (symbol, value) in locals().items():

        print('symbol="%s"、value=%s' % (symbol, value),file=sys.stderr)

#入力（後でいじる）

def pin(type=int):

    return map(type,input().split())





"""

"""



#solution:



#input

def resolve():

    A=sorted(list(pin()))

    B=[a%2 for a in A]

    ans=0

    odd=[]

    even=[]

    for i in range(len(B)):

        if B[i]==0:odd.append(i)

        else:even.append(i)

    if len(odd)==1:

        for x in even:

            A[x]+=1

        ans+=1

    elif len(even)==1:

        for y in odd:

            A[y]+=1

        ans+=1

    ans+=(A[2]*2-A[1]-A[0])//2

    print(ans)

    return 0

    #print(["No","Yes"][cond])

    #print([["NA","YYMM"],["MMYY","AMBIGUOUS"]][cMMYY][cYYMM])

#if __name__=="__main__":resolve()

"""

#printデバッグ消した？

#前の問題の結果見てないのに次の問題に行くの？

"""

"""

お前カッコ閉じるの忘れてるだろ

"""

import sys

from io import StringIO

import unittest



class TestClass(unittest.TestCase):

    def assertIO(self, input, output):

        stdout, stdin = sys.stdout, sys.stdin

        sys.stdout, sys.stdin = StringIO(), StringIO(input)

        resolve()

        sys.stdout.seek(0)

        out = sys.stdout.read()[:-1]

        sys.stdout, sys.stdin = stdout, stdin

        self.assertEqual(out, output)

    def test_入力例_1(self):

        input = """2 5 4"""

        output = """2"""

        self.assertIO(input, output)

    def test_入力例_2(self):

        input = """2 6 3"""

        output = """5"""

        self.assertIO(input, output)

    def test_入力例_3(self):

        input = """31 41 5"""

        output = """23"""

        self.assertIO(input, output)



if __name__ == "__main__":

    resolve()

#!/usr/bin/env python3

#%% for atcoder uniittest use

import sys

input= lambda: sys.stdin.readline().rstrip()

def pin(type=int):return list(map(type,input().split()))

def tupin(t=int):return tuple(pin(t))

#%%code

def resolve():

    A=list(pin())

    A.sort()

    a=0

    if A[0]%2!=A[1]%2:

        A[1]+=1

        A[2]+=1

        a+=1

    a+=(A[2]*2-A[0]-A[1])//2

    print(a)

    

#%%submit!

resolve()
# coding: utf-8
# Your code here!
# coding: utf-8
from fractions import gcd
from functools import reduce
import sys

sys.setrecursionlimit(200000000)
from inspect import currentframe

# my functions here!
# 標準エラー出力
def printargs2err(*args):
    names = {id(v): k for k, v in currentframe().f_back.f_locals.items()}
    print(
        ", ".join(names.get(id(arg), "???") + " : " + repr(arg) for arg in args),
        file=sys.stderr,
    )


def debug(x):
    print(x, file=sys.stderr)


def printglobals():
    for (symbol, value) in globals().items():
        print('symbol="%s"、value=%s' % (symbol, value), file=sys.stderr)


def printlocals():
    for (symbol, value) in locals().items():
        print('symbol="%s"、value=%s' % (symbol, value), file=sys.stderr)


# 入力（後でいじる）
def pin(type=int):
    return map(type, input().split())


"""
"""
# solution:
# input
def resolve():
    A = sorted(list(pin()))
    B = [a % 2 for a in A]
    ans = 0
    odd = []
    even = []
    for i in range(len(B)):
        if B[i] == 0:
            odd.append(i)
        else:
            even.append(i)
    if len(odd) == 1:
        for x in even:
            A[x] += 1
        ans += 1
    elif len(even) == 1:
        for y in odd:
            A[y] += 1
        ans += 1
    ans += (A[2] * 2 - A[1] - A[0]) // 2
    print(ans)
    return 0
    # print(["No","Yes"][cond])
    # print([["NA","YYMM"],["MMYY","AMBIGUOUS"]][cMMYY][cYYMM])


# if __name__=="__main__":resolve()
"""
#printデバッグ消した？
#前の問題の結果見てないのに次の問題に行くの？
"""
"""
お前カッコ閉じるの忘れてるだろ
"""
import sys
from io import StringIO
import unittest


class TestClass(unittest.TestCase):
    def assertIO(self, input, output):
        stdout, stdin = sys.stdout, sys.stdin
        sys.stdout, sys.stdin = StringIO(), StringIO(input)
        resolve()
        sys.stdout.seek(0)
        out = sys.stdout.read()[:-1]
        sys.stdout, sys.stdin = stdout, stdin
        self.assertEqual(out, output)

    def test_入力例_1(self):
        input = """2 5 4"""
        output = """2"""
        self.assertIO(input, output)

    def test_入力例_2(self):
        input = """2 6 3"""
        output = """5"""
        self.assertIO(input, output)

    def test_入力例_3(self):
        input = """31 41 5"""
        output = """23"""
        self.assertIO(input, output)


if __name__ == "__main__":
    resolve()

#!/usr/bin/env python3
#%% for atcoder uniittest use
import sys

input = lambda: sys.stdin.readline().rstrip()


def pin(type=int):
    return list(map(type, input().split()))


def tupin(t=int):
    return tuple(pin(t))


#%%code
def resolve():
    A = list(pin())
    A.sort()
    a = 0
    if A[0] % 2 != A[1] % 2:
        A[1] += 1
        A[2] += 1
        a += 1
    a += (A[2] * 2 - A[0] - A[1]) // 2
    print(a)


#%%submit!
resolve()

-# coding: utf-8 -# Your code here! -# coding: utf-8 -from fractions import gcd -from functools import reduce +#!/usr/bin/env python3 +#%% for atcoder uniittest use -sys.setrecursionlimit(200000000) -from inspect import currentframe - -# my functions here! -# 標準エラー出力 -def printargs2err(*args): -    names = {id(v): k for k, v in currentframe().f_back.f_locals.items()} -    print( -        ", ".join(names.get(id(arg), "???") + " : " + repr(arg) for arg in args), -        file=sys.stderr, -    ) +input = lambda: sys.stdin.readline().rstrip() -def debug(x): -    print(x, file=sys.stderr) +def pin(type=int): +    return list(map(type, input().split())) -def printglobals(): -    for (symbol, value) in globals().items(): -        print('symbol="%s"、value=%s' % (symbol, value), file=sys.stderr) +def tupin(t=int): +    return tuple(pin(t)) -def printlocals(): -    for (symbol, value) in locals().items(): -        print('symbol="%s"、value=%s' % (symbol, value), file=sys.stderr) +#%%code +def resolve(): +    A = list(pin()) +    A.sort() +    a = 0 +    if A[0] % 2 != A[1] % 2: +        A[1] += 1 +        A[2] += 1 +        a += 1 +    a += (A[2] * 2 - A[0] - A[1]) // 2 +    print(a) -# 入力（後でいじる） -def pin(type=int): -    return map(type, input().split()) - - -""" -""" -# solution: -# input -def resolve(): -    A = sorted(list(pin())) -    B = [a % 2 for a in A] -    ans = 0 -    odd = [] -    even = [] -    for i in range(len(B)): -        if B[i] == 0: -            odd.append(i) -        else: -            even.append(i) -    if len(odd) == 1: -        for x in even: -            A[x] += 1 -        ans += 1 -    elif len(even) == 1: -        for y in odd: -            A[y] += 1 -        ans += 1 -    ans += (A[2] * 2 - A[1] - A[0]) // 2 -    print(ans) -    return 0 -    # print(["No","Yes"][cond]) -    # print([["NA","YYMM"],["MMYY","AMBIGUOUS"]][cMMYY][cYYMM]) - - -# if __name__=="__main__":resolve() -""" -#printデバッグ消した？ -#前の問題の結果見てないのに次の問題に行くの？ -""" -""" -お前カッコ閉じるの忘れてるだろ -""" -import sys -from io import StringIO -import unittest - - -class TestClass(unittest.TestCase): -    def assertIO(self, input, output): -        stdout, stdin = sys.stdout, sys.stdin -        sys.stdout, sys.stdin = StringIO(), StringIO(input) -        resolve() -        sys.stdout.seek(0) -        out = sys.stdout.read()[:-1] -        sys.stdout, sys.stdin = stdout, stdin -        self.assertEqual(out, output) - -    def test_入力例_1(self): -        input = """2 5 4""" -        output = """2""" -        self.assertIO(input, output) - -    def test_入力例_2(self): -        input = """2 6 3""" -        output = """5""" -        self.assertIO(input, output) - -    def test_入力例_3(self): -        input = """31 41 5""" -        output = """23""" -        self.assertIO(input, output) - - -if __name__ == "__main__": -    resolve() +#%%submit! +resolve()