#include <iostream>
#include <cstdio>
#include <vector>
#define _USE_MATH_DEFINES
#include <math.h>
#include <cstring>
#include <numeric>
#include <algorithm>
#include <stdlib.h>
#include <functional>
#include <string>
#include <list>
#include <fstream>
#include <iomanip>
#include <array>
#include <map>
#include <queue>
#include <limits.h>
#include <set>
#include <stack>
#include <random>
#include <complex>
#include <unordered_map>
#include <unordered_set>
#include <chrono>
#include <bitset>
#define rep(i,s,n) for(int i = (s); (n) > i; i++)
#define REP(i,n) rep(i,0,n)
#define RANGE(x,a,b) ((a) <= (x) && (x) <= (b))
#define DUPLE(a,b,c,d) (RANGE(a,c,d) || RANGE(b,c,d) || RANGE(c,a,b) || RANGE(d,a,b))
#define INCLU(a,b,c,d) (RANGE(a,c,d) && (b,c,d))
#define PW(x) ((x)*(x))
#define ALL(x) (x).begin(), (x).end()
#define MODU 1000000007
#define bitcheck(a,b)   ((a >> b) & 1)
#define bitset(a,b)      ( a |= (1 << b))
#define bitunset(a,b)    (a &= ~(1 << b))
#define MP(a,b) make_pair((a),(b))
#define Manh(a,b) (abs((a).first-(b).first) + abs((a).second - ((b).second))
#define pritnf printf
#define scnaf scanf
#define itn int

#include <nmmintrin.h>
#ifdef _MSC_VER

#define __builtin_popcount _mm_popcnt_u32
#define __builtin_popcountll _mm_popcnt_u64
#endif
using namespace std;
typedef long long ll;
typedef pair<int, int> pii;
typedef pair<ll, ll> pll;
template<typename A, size_t N, typename T>
void Fill(A(&array)[N], const T &val) {
	std::fill((T*)array, (T*)(array + N), val);
}

struct Edge {
	int from, to, w;
};
  
class SegmentTree {//基本的に半開区間 [a,b)
public:
	vector<int> data;
	int n = 1;
	SegmentTree(int a) {
		while (n < a) n *= 2;
		data = vector<int>(n * 2 - 1, 0);
	}
	void update(int p, int a) {
		int cur = p + n - 1;
		while (cur) {
			data[cur] += a;
			cur = (cur - 1) / 2;
		}
		data[0] = a;
	}
	int sum(int a, int b, int num = 0, int base = 1) {
		int l = (num + 1 - base) * (n / base), r = l + n / base;

		if (a == l && b == r)
			return data[num];
		int nr = (l + r) / 2;
		int ret = 0;
		if (nr > a) ret += sum(a, min(b, nr), num * 2 + 1, base * 2);
		if (nr < b) ret += sum(max(a, nr), b, num * 2 + 2, base * 2);
		return ret;
	}
};

struct UnionFind {
	vector<int> data;
	UnionFind(int size) : data(size, -1) { }
	bool unionSet(int x, int y) { //ｘの入ってる集合と yの入ってる集合を併合
		x = root(x); y = root(y);
		if (x != y) {
			if (data[y] < data[x]) swap(x, y);
			data[x] += data[y]; data[y] = x;
		}
		return x != y;
	}
	bool findSet(int x, int y) { //xとyが同じ集合に入っているかどうかを判定
		return root(x) == root(y);
	}
	int root(int x) {
		return data[x] < 0 ? x : data[x] = root(data[x]);
	}
	bool isroot(int x) {
		return data[x] < 0;
	}
	int size(int x) {
		return -data[root(x)];
	}
};

int main() {
	int a, b, c;
	cin >> a >> b >> c;

	vector<int> cou[2];
	cou[a % 2].push_back(a);
	cou[b % 2].push_back(b);
	cou[c % 2].push_back(c);
	int ans = 0;
	if (cou[0].size() == 2) {
		cou[0][0]++;
		cou[0][1]++;
		ans++;
	}
	if (cou[1].size() == 2) {
		cou[1][0]++;
		cou[1][1]++;
		ans++;
	}
	vector<int> num;
	for (auto itr : cou[0])
		num.push_back(itr);
	for (auto itr : cou[1])
		num.push_back(itr);

	sort(ALL(num));

	ans += (num[2] - num[0])/2;
	ans += (num[2] - num[1]) / 2;
	cout << ans << endl;
	return 0;
}

Measured memory_bytes: 256