func LI() -> [Int] {
    return readLine()!.split(separator: " ").map{ Int{$0}! }
}

func I() -> Int {
    return Int(readLine()!)!
}

func S() -> String {
    return readLine()!
}
int a
int b
a,b = LI()
print(max(0,a-2*b))