def main():
 a,b = map(int,input().split())
 if a <= b * 2:
     print(0)
 else:
     print(a - 2 * b)
main() def main():
 a,b = map(int,input().split())
 if a <= b * 2:
     print(0)
 else:
     print(a - 2 * b) main a,b = map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b if a <= b * 2:
     print(0)
 else:
     print(a - 2 * b) a <= b * 2 a b * 2 b 2 print(0) print 0 print(a - 2 * b) print a - 2 * b a 2 * b 2 b main() main def main():
 a,b = map(int,input().split())
 if a <= b * 2:
     print(0)
 else:
     print(a - 2 * b) def main():
 a,b = map(int,input().split())
 if a <= b * 2:
     print(0)
 else:
     print(a - 2 * b) main
def main():
 a,b = map(int,input().split())
 if a <= b * 2:
     print(0)
 else:
     print(a - 2 * b)
main()