void main()
{
    long[] abc = readln.split.to!(long[]);

    abc.sort!"a < b";
    long cnt = abc[2] - abc[1];
    long diff = abc[2] - abc[0] - cnt;
    cnt += (diff + 1) / 2 + diff % 2;

    cnt.writeln;
}

import std.stdio;
import std.string;
import std.array;
import std.conv;
import std.algorithm;
import std.range;
import std.math;
import std.numeric;
import std.container;
import std.typecons;
import std.ascii;
import std.uni;