Public Class Program
  Shared Sub Main()
    Dim ab As Integer() = Array.ConvertAll(Of String, Integer)(Console.ReadLine().Split(" "), AddressOf Integer.Parse)
    Dim a As Integer = ab(0)
    Dim b As Integer = ab(1)
    Dim ans As Integer = a - 2 * b
    If ans < 0 Then ans = 0
    Console.WriteLine(ans.ToString())
  End Sub
End Class