#pragma warning(disable:4996)
#include <regex>
#include <tuple>
#include <sstream>
#include <queue>
#include <map>
#include <numeric>
#include <list>
#include <limits.h>
#include <vector>
#include <utility>
#include <string>
#include <iostream>
#include <array>
#include <algorithm>
#include <stdio.h>
#include <stack>
#include <float.h>
#include <cmath>
#include <cstdio>
#include <iomanip>
#include <set>
#include <unordered_set>
#include <chrono>
#include <functional>
using namespace std;
using namespace std::chrono;

#define INITVAL INT_MAX
#define FOR(i,a,b) for(int i = (a); i < (b); ++i)
#define REP(i,N) FOR(i,0,N)
#define MP(a, b) make_pair(a, b)
#define WHITE first
#define BLACK second
using pii = pair<int, int>;
using pll = pair<long long, long long>;
using vi = vector<int>;
using vvi = vector<vi>;
using ll = long long;
using vll = vector<ll>;
using vvll = vector<vll>;
using vc = vector<char>;
using vvc = vector<vc>;
using vb = vector<bool>;
using vvb = vector<vb>;
#define INPUT(type, name) type name; cin >> name;

#define IN_H(h) (0 <= (h) && (h) < H)
#define IN_W(w) (0 <= (w) && (w) < W)
#define CELL(cell, h, w) (IN_H(h) && IN_W(w) ? cell[h][w] : INT_MAX)

#define BETWEEN(x1, x, x2) (x1 <= x && x < x2)
#define PUSH(x, y) (t[y][x] == 0){q.push(pii(x, y));t[y][x] = 1;}
#define sq(x) ((x)*(x))

#ifdef _MSC_VER
#include <intrin.h>
#include <stdint.h>
#define __builtin_popcount __popcnt
#define __builtin_ctz ctz
#define __builtin_clz clz

static uint32_t inline ctz(uint32_t x)
{
	unsigned long r = 0;
	_BitScanReverse(&r, x);
	return r;
}

static uint32_t inline clz(uint32_t x)
{
	unsigned long r = 0;
	_BitScanForward(&r, x);
	return r;
}

#endif

class Timer
{
public:
	Timer() :start_(system_clock::now()){}
	double elapsed() const
	{
#ifndef TEST
		duration<double> d = system_clock::now() - start_;
		return d.count();
#else
		return 0;
#endif
	}
private:
	system_clock::time_point start_;
};

template<int N>
class UnionFind
{
public:
	UnionFind() :parent(N){ REP(i, N)parent[i] = i; }
	bool isSame(int A, int B){ return root(A) == root(B); }
	void unite(int A, int B)
	{
		A = root(A);
		B = root(B);
		if (A != B)
		{
			parent[B] = A;
		}
	}
private:
	vi parent;
	int root(int x)
	{
		if (parent[x] == x)
		{
			return x;
		}
		else
		{
			return parent[x] = root(parent[x]);
		}
	}
};

template<typename T>
bool isInclude(T l, T v, T r)
{
	return l < v && v < r;
}

template<typename T>
bool isPrime(T n)
{
	T i;
	if (n < 2) return false;
	else if (n == 2) return true;
	if (n % 2 == 0) return false;
	for (i = 3; i <= n / i; i += 2)
	if (n % i == 0) return false;
	return true;
}

template<typename TYPE, std::size_t SIZE>
std::size_t array_length(const TYPE(&array)[SIZE])
{
	return SIZE;
}

struct Point
{
	int x;
	int y;
	Point() :x(), y(){}
	Point(int newX, int newY) :x(newX), y(newY){}
	Point left()const
	{
		return Point(x - 1, y);
	}
	Point right()const
	{
		return Point(x + 1, y);
	}
	Point up()const
	{
		return Point(x, y + 1);
	}
	Point down()const
	{
		return Point(x, y - 1);
	}
	bool operator>(const Point& v)const;
	bool operator<(const Point& v)const;
	bool operator==(const Point& v)const
	{
		return x == v.x && y == v.y;
	}
};

vector<Point> target;
static const int INF = 999999;
class Cell
{
	friend struct Point;
public:
	Cell(const vvi& m, vvi& c, int h)
		:m_(m), highest_(h), sum_()
	{
		cost_ = c;
		r_ = m_.size();
		c_ = m_[0].size();
	}
	void dfs2(size_t s, vvi& p2p)
	{
		vector<Point> q;
		q.push_back(target[s]);
		cost_ = vvi(r_, vi(c_, INF));
		cost_[target[s].y][target[s].x] = 0;
		while (!q.empty())
		{
			auto p = *q.begin();
			Point pp[4] = { p.left(), p.right(), p.up(), p.down() };
			for (auto& i : pp)
			{
				if (isInside(i))
				{
					int cur = cost_[p.y][p.x];
					int newCost = cur + cost(p, i);
					if (cost_[i.y][i.x] > newCost)
					{
						cost_[i.y][i.x] = newCost;
						q.push_back(i);
					}
				}
			}
			q.erase(q.begin());
			sort(q.begin(), q.end());
			q.erase(unique(q.begin(), q.end()), q.end());
		}
		for (size_t i = 0, ii = target.size(); i < ii; ++i)
		{
			p2p[s][i] = cost_[target[i].y][target[i].x];
		}

	}
	int dfs()
	{
		vvi p2p = vvi(target.size(), vi(target.size(), INF));
		for (size_t j = 0, jj = target.size(); j < jj; ++j)
		{
			dfs2(j, p2p);
		}
		size_t* idx = new size_t[target.size() + 1];
		for (size_t i = 0, ii = target.size(); i<ii; ++i)
		{
			idx[i] = i;
		}
		idx[target.size()] = 0;
		int minSum = INF;
		do
		{
			int tempSum = 0;
			for (size_t i = 0, ii = target.size(); i < ii; ++i)
			{
				tempSum += p2p[idx[i]][idx[i + 1]];
				if (tempSum > minSum)break;
			}
			minSum = min(minSum, tempSum);
		} while (next_permutation(idx + 1, idx + target.size()));
		delete[] idx;

		return minSum;
	}

private:
	const vvi& m_;
	static vvi cost_;
	int highest_;
	size_t r_;
	size_t c_;
	int sum_;
	int cost(const Point& cur, const Point& next)
	{
		switch (m_[cur.y][cur.x] - m_[next.y][next.x])
		{
		case -1:return  11;
		case  0:return   3;
		case  1:return   2;
		default:return INF;
		}
	}
	bool isInside(const Point& p)
	{
		return
			(0 <= p.x && p.x < c_) &&
			(0 <= p.y && p.y < r_);
	}
};
vvi Cell::cost_;
bool Point::operator>(const Point& v)const
{
	return Cell::cost_[y][x] > Cell::cost_[v.y][v.x];
}
bool Point::operator<(const Point& v)const
{
	return Cell::cost_[y][x] < Cell::cost_[v.y][v.x];
}
class Solver
{
public:
	Solver(istream& i, ostream& o) :cin(i), cout(o){}
	int solve()
	{
		vi abc(3);
		for (auto& i : abc)
		{
			cin >> i;
		}
		ll r = 0;
		sort(abc.begin(), abc.end());
		r = abc[2] - abc[0] + abc[2] - abc[1];
		r += r % 2 == 0 ? 0 : 3;
		cout << (r/2) << endl;
		return 0;
	}
private:
	istream& cin;
	ostream& cout;

};
#ifndef TEST
int main(int argv, char* argc[])
{
	Solver s(cin, cout);
	return s.solve();
}
#else
class TestCase
{
public:
	string input;
	string expect;
	TestCase(string in, string expc) :input(in), expect(expc){}
};
vector<TestCase> inputs;
#define ADDTEST(i,o) inputs.push_back(TestCase(i,o));
void createTestCase()
{
	//#include "TestCase.cpp"
	ADDTEST(
		"2 5 4\n"
		,
		"2\n"
		);
	ADDTEST(
		"2 5 4\n"
		,
		"2\n"
		);
	ADDTEST(
		"2 6 3\n"
		,
		"5\n"
		);
	ADDTEST(
		"31 41 5\n"
		,
		"23\n"
		);

}
int main(int argv, char* argc[])
{
	createTestCase();
	for (size_t i = 0; i < inputs.size(); ++i)
	{
		cout << "Case " << i + 1 << " is ";
		istringstream iss(inputs[i].input);
		ostringstream oss;
		Solver s(iss, oss);
		s.solve();
		string actual = oss.str();
		if (actual == inputs[i].expect)
		{
			cout << "OK" << endl;
		}
		else
		{
			cout << "NG" << endl;
			cout << "\texpected :" << inputs[i].expect << endl;
			cout << "\tactual   :" << actual << endl;
		}
	}
	return 0;
}
#endif

Measured memory_bytes: 256