void main()
{
    import std.array, std.stdio, std.string, std.conv;
    auto buf = readln.chomp.split.to!(int[]);
    auto window = buf[0];
    auto curtain = buf[1] << 1;
    if (window > curtain)
        (window - curtain).writeln;
    else
        0.writeln;
}
