import sys

input = sys.stdin.readline



a, b = [int(x) for x in input().split()]

if 2*b >= a:

    print((0))

else:

    print((a - 2*b))
import sys

input = lambda : sys.stdin.readline().rstrip()



a, b = list(map(int, input().split()))

print((max(0, a - 2*b)))
import sys

input = sys.stdin.readline
a, b = [int(x) for x in input().split()]
if 2 * b >= a:
    print((0))
else:
    print((a - 2 * b))

import sys

input = lambda: sys.stdin.readline().rstrip()
a, b = list(map(int, input().split()))
print((max(0, a - 2 * b)))

-input = sys.stdin.readline -a, b = [int(x) for x in input().split()] -if 2 * b >= a: -    print((0)) -else: -    print((a - 2 * b)) +input = lambda: sys.stdin.readline().rstrip() +a, b = list(map(int, input().split())) +print((max(0, a - 2 * b)))