import sys
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
a, b = ISI()
if a<2*b:print(0)
else:print(a-2*b) import sys sys def ISI(): return map(int, sys.stdin.readline().rstrip().split()) ISI a, b = ISI() a ISI() ISI b if a<2*b:print(0)
else:print(a-2*b) a<2*b a 2*b 2 b a, b = ISI() ISI() a def ISI(): return map(int, sys.stdin.readline().rstrip().split()) def ISI(): return map(int, sys.stdin.readline().rstrip().split()) ISI b = ISI() ISI() b
import sys
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
a, b = ISI()
if a<2*b:print(0)
else:print(a-2*b)