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