func readInts() -> [Int] {
    return readLine()!.split(separator: " ").map { Int($0)! }
}
let katen = readInts()
let a = katen[0]
let b = katen[1]
let long = a - 2*b
if long >= 0 { 
  print(long) }
else {
  print(0)
}
