open System
[<EntryPoint>]
let main yaju_114514 =
      let ab = Console.ReadLine().Split(' ') |> Array.map int
      if ab.[0] <= ab.[1] * 2 then 0 else ab.[0] - ab.[1] * 2
      |> Console.WriteLine
      0