module A
  sub Main(ByVal args() as String)
    dim a,b as integer
    dim ans as integer
    dim arr(2) as string
    arr = Split(Console.ReadLine())
    a = arr(0): b = arr(1)
    ans = a-2*b
    Console.WriteLine(If(ans > 0, ans, 0))
    
  end sub
end module