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

void main() {
	auto ip = readln.split.to!(int[]), W = ip[0], a = ip[1], b = ip[2];
	if(b - (a+W) < 0 || a - (b+W) < 0) {
		0.writeln;
		return;
	}
	min(abs(a+W-b), abs(b+W - a)).writeln;
}
