with Ada.Text_IO;
with Ada.Integer_Text_IO;
with Ada.Float_Text_IO;
use Ada.Text_IO;
use Ada.Integer_Text_IO;
use Ada.Float_Text_IO;

procedure hoge is
 a: integer;
 b: integer;
begin
 get(a);
 get(b);
 if a<=b*2 then
  put(0);
 else
  put(a-b*2);
 end if;
end hoge;