import std.algorithm;
import std.array;
import std.conv;
import std.math;
import std.range;
import std.stdio;
import std.string;
import std.typecons;

T read(T)() { return readln.chomp.to!T; }
T[] reads(T)() { return readln.split.to!(T[]); }
alias readint = read!int;
alias readints = reads!int;

alias Rect = Tuple!(int, "left", int, "right");

int calc(Rect a, Rect b) {
    if (a.left > b.left) return calc(b, a);

    return max(0, b.left - a.right);
}

void main() {
    auto wab = readints;
    int w = wab[0], a = wab[1], b = wab[2];

    auto r1 = Rect(a, a + w);
    auto r2 = Rect(b, b + w);
    writeln(calc(r1, r2));
}
