import std.stdio, std.conv, std.string, std.range, std.algorithm, std.array,
  std.functional, std.container, std.typecons;

void main() {
  auto input = readln.split.to!(int[]);
  int A = input[0], B = input[1];

  writeln(max(A-B-B, 0));
}
