Problem:
 Score : 100 points    Problem Statement The window of Takahashi's room has a width of A . There are two curtains hung over the window, each of which has a horizontal length of B . (Vertically, the curtains are long enough to cover the whole window.)  We will close the window so as to minimize the total horizontal length of the uncovered part of the window.
Find the total horizontal length of the uncovered parts of the window then.      Constraints  1 \leq A \leq 100  1 \leq B \leq 100  A and B are integers.         Input Input is given from Standard Input in the following format:  A  B       Output Print the total horizontal length of the uncovered parts of the window.        Sample Input 1 12 4      Sample Output 1 4  We have a window with a horizontal length of 12 , and two curtains, each of length 4 , that cover both ends of the window, for example. The uncovered part has a horizontal length of 4 .       Sample Input 2 20 15      Sample Output 2 0  If the window is completely covered, print 0 .       Sample Input 3 20 30      Sample Output 3 0  Each curtain may be longer than the window.

Solution (Python):
A,B = map(int,input().split())
if(A >= B * 2):
    print(A - B * 2)
else:
    print(0)

Solution (Python):
a,b=map(int,input().split())

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

Solution (Python):
a,b = map(int,input().split())

if a <= b or a - (b * 2) <= 0:
    print("0")

else:
    print(a - (b * 2))

Solution (Python):
A, B = map(int, input().split())

C = B * 2

if C >= A:
    print(0)
else:
    print(A - C)

Solution (Python):
a, b = map(int, input().split())
print(max(0, a-b*2))

Solution (Python):
a, b = map(int, input().split())
print(max(0, a - b * 2))

Solution (Python):
import sys
stdin=sys.stdin

ip=lambda: int(sp())

lp=lambda:list(map(int,stdin.readline().split()))
sp=lambda:stdin.readline().rstrip()

a,b=lp()

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

Solution (Python):
A, B = map(int, input().split())
print(A-B*2) if A>B*2 else print(0)

Solution (Python):
a,b=map(int,input().split())

result=a-b*2

if result > 0:
  print(result)
else:
  print(0)

Solution (Python):
a,b = map(int, input().split())
print(max(0, a-2*b))

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
a,b = map(int,input().split())
print(a-2*b if a-2*b>0 else 0)

Solution (Python):
A, B = map(int,input().split())
L = int(A-2*B)
if L>0:
    print(L)
else:
    print(0)

Solution (Python):
A,B = map(int,input().split())
print(max(0,A-B*2))

Solution (Python):
A, B = map(int, input().split())

print(max(A - 2 * B, 0))

Solution (Python):
a, b = map(int, input().split())

if a <= b:
    print(0)
elif a - 2*b <= 0:
    print(0)
elif a - 2*b > 0:
    print(a - 2 * b)

Solution (Python):
A,B=map(int,input().split())
print(max(0,A-B*2))

Solution (Python):
a,b=map(int, input().split())

c=a-2*b
if c<0:
    c=0
print(c)

Solution (Python):
A,B = map(int,input().split())

if A - 2*B > 0 :
    print(A-2*B)
else :
    print("0")

Solution (Python):
A,B=map(int, input().split())

print(A-B*2 if A-B*2>0 else 0)

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

Solution (Python):
a,b=map(int, input().split())
c=a-2*b
print(c if c>=0 else 0 )

Solution (Python):
A, B = [int(n) for n in input().split()]

print(max(0, int(A-2*B)))

Solution (Python):
a,b=map(int,input().split())

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

Solution (Python):


A,B = map(int,input().split())

ans = A - B*2

if ans <= 0:
    print(0)

else:
    print(ans)

Solution (Python):
a,b = map(int,input().split())
print(a-2*b if a > 2*b else 0)

Solution (Python):
A,B=map(int,input().split())
print(max(0, A-2*B))

Solution (Python):
a, b = map(int, input().split())

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

Solution (Python):
a, b = map(int, input().split())

if a > b * 2:
    print(a - b * 2)
else:
    print(0)

Solution (Python):
a, b = [int(i) for i in input().split()]
if a >= b*2:
  print(a - b*2)
else:
  print(0)

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

Solution (Python):
a,b = map(int,input().split())

if a > b * 2:
  print(a - b * 2)
else:
  print(0)

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

Solution (Python):
A, B = map(int, input().split())

if A >= 2*B:
  print(A-2*B)
else:
  print(0)

Solution (Python):
A,B=map(int,input().split())
print(max(0,A-2*B))

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
a,b = map(int, input().split())
print(max(0,a-b*2))

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

Solution (Python):
a, b = map(int, input().split())

if a <= 2*b:
    print(0)
else :
    print(a-2*b)

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
A,B=map(int,input().split())
print(max(0,A-2*B))

Solution (Python):
A,B=map(int,input().split())
if A>B*2:
  print(A-B*2)
else:
  print(0)

Solution (Python):
A,B=map(int,input().split())
if A-(B*2) > 0:
    print(A-(B*2))
else:
    print(0)

Solution (Python):
A, B = map(int, input().split())
print(max(0, A - 2 * B))

Solution (Python):
A, B = map(int, input().split())

ANS = A - B * 2
if ANS <= 0:
    print(0)
else:
    print(ANS)

Solution (Python):

a,b = map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
a,b = [int(x) for x in input().split()]
print(max(0,a-2*b))

Solution (Python):


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

Solution (Python):
house_len, curtain_len = map(int, input().split())

if house_len >= curtain_len * 2:
    print(house_len - curtain_len * 2)
else:
    print(0)

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

Solution (Python):
a, b = map(int, input().split())
uncovered = a - 2 * b
if uncovered > 0:
  print(uncovered)
else:
  print(0)

Solution (Python):
A, B = map(int, input().split())

if A > 2*B:
    print(A-2*B)
else:
    print(0)

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

Solution (Python):
A, B = map(int, input().split())

'''
if A > 2*B: print(A-2*B)
else: print(0)
'''

print(max(0, A-2*B))

Solution (Python):
A, B = map(int, input().split())

if A > 2*B: print(A-2*B)
else: print(0)

Solution (Python):
A, B = map(int, input().split())

if A >= B*2: print(A-B*2)
else: print(0)

Solution (Python):
A, B = map(int, input().split())
ans = A - 2*B
if ans < 0:
  print(0)
else:
  print(ans)

Solution (Python):
A,B = (int(x) for x in input().split())
print(max(0,A-2*B))

Solution (Python):
a, b = map(int, input().split())
print(a - b * 2 if a-b*2 > 0 else 0)

Solution (Python):
def main():
    import sys
    readline = sys.stdin.buffer.readline

    a, b = map(int, readline().split())
    print(max(0, a-b-b))

if __name__ == '__main__':
    main()

Solution (Python):
A, B = map(int, input().split())
print((A-2*B) if A > 2*B else 0)

Solution (Python):
A,B = map(int,input().split())
print(max(0,A-2*B))

Solution (Python):
a, b = map(int, input().split())
print(max(a - 2 * b, 0))

Solution (Python):


from typing import *
import collections
import functools as fts
import itertools as its
import math
import sys

INF = float('inf')


def solve(A: int, B: int):
    return max(A-2*B, 0)


def main():

    sys.setrecursionlimit(10 ** 6)

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  
    B = int(next(tokens))  
    print(f'{solve(A, B)}')


if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int,input().split())
if a > 2*b:
  print(a-2*b)
else:
  print("0")

Solution (Python):
A,B = map(int,input().split())

print(max(0,A-B*2))

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
A, B = map(int, input().split())

print(max(0, A-2*B))

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
A, B = map(int, input().split())
ans = A - B - B
if ans < 0:
  ans = 0
print(ans)

Solution (Python):
A, B = map(int, input().split())
ans = A - (2 * B)

if ans < 0:
    print(0)
else:
    print(ans)

Solution (Python):
a,b=map(int, input().split())
if b*2>=a: print(0)
else: print(a-2*b)

Solution (Python):
A, B = map(int, input().split())
print(max(0, A - 2 * B))

Solution (Python):
A, B = map(int, input().split())
if A > B * 2:
  print(A - 2 * B)
else:
  print(0)

Solution (Python):

a,b=map(int,input().split())
if b>=a:
    print('0')
elif a-2*b >= 0:
    print(a-2*b)
else:
    print('0')

Solution (Python):
a,b=map(int,input().split())
ans=a-b*2
if ans>=0:
    print(ans)
else:
    print(0)

Solution (Python):
A,B=map(int,input().split())
print(max(0,A-2*B))

Solution (Python):
A, B = list(map(int, input().split()))
print(max(0, A - 2 * B))

Solution (Python):
a,b = map(int,input().split())
ans = a - 2*b
if ans >= 0 :
  print(ans)
else :
  print(0)

Solution (Python):
A, B = map(int, input().split())
print(max(0, A - 2*B))

Solution (Python):
a, b = map(int, input().split())
c = a - 2 * b
if c > 0:
    print(c)
else:
    print(0)

Solution (Python):
li = [int(x) for x in input().split()]
if 2*li[1]>=li[0]:
  print('0')
else:
  print(li[0]-2*li[1])

Solution (Python):
A, B = map(int, input().split())

print(max(0, A-2*B))

Solution (Python):
a,b=map(int, input().split())

if a>2*b:print(a-2*b)
else:print(0)

Solution (Python):


a, b = map(int, input().strip().split())
res = max(0, a - 2 * b)
print(res)

Solution (Python):
a,b=map(int,input().split(' '))


if a<=(b*2):
    print(0)
else:
    print(a-(b*2))

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

Solution (Python):
a, b = map(int, input().split())
res = a - b * 2

if res < 0:
    print(0)
else:
    print(res)

Solution (Python):
a,b = map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
a,b = map(int,input().split())
if b*2 >= a:
  print(0)
else:
  print(a-b*2)

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

b = b * 2

print(max(0, a - b))

Solution (Python):
a, b = map(int,input().split())
if (a > 2*b):
  print(a - 2*b)
else:
  print(0)

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-b*2))

Solution (Python):
a = list(map(int, input().split()))
print(max(0, a[0] - a[1]*2))

Solution (Python):
A, B = map(int, input().split())

print(max(0, A - 2 * B))

Solution (Python):
a,b = map(int,input().split())
print(max(a-2*b,0))

Solution (Python):
a,b=map(int,input().split())
if a>=2*b:
  print(a-2*b)
else:
  print(0)

Solution (Python):
A, B = map(int, input().split())
C = A - (B*2)
C = 0 if C < 0 else C
print(C)

Solution (Python):
a,b = map(int,input().split())

print(a-2*b if a>=2*b else 0)

Solution (Python):
a,b = map(int,input().split())

if a <= 2*b:
  print("0")
else:
  print((a-2*b))

Solution (Python):
A, B = map(int, input().split())

if 2 * B >= A:
    print("0")
else:
    print(A - 2 * B)

Solution (Python):
def main():
    A, B = map(int, input().split())

    if A - 2 * B > 0:
        ans = A - 2 * B
    else:
        ans = 0

    print(ans)


if __name__ == "__main__":
    main()

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

Solution (Python):
A,B=list(map(int, input().split()))
print(max(0,A-2*B))

Solution (Python):
a,b=map(int,input().split())
if a-2*b>=0:
    print(a-2*b)
else:
    print("0")

Solution (Python):
A,B=map(int,input().split())
if A-(2*B)>=0:
    print(A-(2*B))
else:
    print(0)

Solution (Python):
A, B = map(int, input().split())
print(max(A-2*B, 0))

Solution (Python):
A,B = map (int, input ().split ())
X = A-B*2
if X < 0:
  print (0)
else:
  print (X)

Solution (Python):
a,b=input().split()
a=int(a)
b=int(b)
if a-b*2>=0:
  print(int(a-b*2))
else:
  print("0")

Solution (Python):
a,b=(int(x) for x in input().split())
if(a-2*b<0):
    print(0)
else:
    print(a-2*b)

Solution (Python):
A,B=map(int,input().split())
if A-2*B < 0:
    print(0)
else:
    print(A-2*B)

Solution (Python):
A,B = map(int,input().split())


x = A-2*B


if x < 0:
    print(0)
else:
    print(x)

Solution (Python):
A,B=map(int, input().split())
if 2*B<=A:
    print(A-2*B)
else:
    print(0)

Solution (Python):
a,b=map(int,input().split())

if a-2*b>0:
  print(a-2*b)
else:
  print(0)

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

Solution (Python):
a, b = map(int, input().split(" "))
ans = a-(b*2)
print(ans if ans > 0 else "0")

Solution (Python):
a, b = map(int, input().split())
print(a - (2 * b) if a > (2 * b) else 0)

Solution (Python):
A, B = map(int, input().split())

ans = A - B * 2

if ans < 0:
    print(0)
else:
    print(ans)

Solution (Python):
a,b=map(int,input().split())
if a > 2*b:
  print(a-2*b)
else:
  print(0)

Solution (Python):
A, B = map(int,input().split())
if A <= B*2:
    print(0)
else:
    print(A-2*B)

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

Solution (Python):
n,m=map(int,input().split())
if(n-m*2>=0):
  print(n-m*2)
else:
  print(0)

Solution (Python):
import sys
sys.setrecursionlimit(10**9)

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    A,B=mi()
    print(max(0,A-2*B))




if __name__ == "__main__":
    main()

Solution (Python):
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy


import heapq
sys.setrecursionlimit(10**6)

INF = 10**18
import bisect
import statistics
mod = 10**9+7


N, M = map(int, input().split())

print(max(0, N-2*M))

Solution (Python):

a, b = map(int, input().split())
x = a-(b * 2)
if x > 0:
    print(x)
else:
    print(0)

Solution (Python):
A, B = map(int, input().split())
if A <= 2*B:
    print(0)

else:
    print(A - 2*B)

Solution (Python):
import sys, bisect, math, itertools, string, queue, copy








def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

a, b = inpm()
ans = a - 2 * b
if(ans < 0):
    ans = 0
print(ans)

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

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

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

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

Solution (Python):
A, B = map(int, input().split())

ans = max(A-B*2,0)

print(ans)

Solution (Python):
a,b=map(int,input().split())
if b>a:
  print(0)
elif(b*2>a):
  print(0)
else:
  print(a-b*2)

Solution (Python):
A,B = map(int,input().split())

if A <= 2*B:
    print(0)
else:
    print(A-2*B)

Solution (Python):
a, b = list(map(int, input().split()))
if b * 2 >= a:
    print(0)
else:
    print(a-b*2)

Solution (Python):
A, B = map(int, input().split())
if A <= B*2:
    print(0)
elif A > B*2:
    print(A-B*2)

Solution (Python):
import sys


def main():
    input = sys.stdin.buffer.readline
    a, b = map(int, input().split())
    print(max(0, a - 2 * b))


if __name__ == "__main__":
    main()

Solution (Python):
a = input().split()
if int(a[0]) <= int(a[1]) * 2:
  print("0")
else:
  print(int(int(a[0]) - int(a[1]) * 2))

Solution (Python):

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


if __name__ == "__main__":
    main()

Solution (Python):
A, B = map(int, input().split())

ans = A-(B*2)
if ans >= 0:
    print(ans)
else:
    print(0)

Solution (Python):
a,b = map(int, input().split())
if a - 2*b > 0:
  print(a-2*b)
else:
  print(0)

Solution (Python):
a,b = map(int,input().split())
print(max((a-2*b),0))

Solution (Python):
a,b = map(int,input().split())

if a <= b * 2:
  print(0)
else:
  print(a - b * 2)

Solution (Python):
A, B = list(map(int, input().split()))
ans = max(0, A - B * 2)
print(ans)

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
A,B = map(int,input().split())
print(max(0,A-B*2))

Solution (Python):
A, B = map(int, input().split())
print(A-2*B) if A-2*B > 0 else print(0)

Solution (Python):
a,b=map(int, input().split())
if a-b*2>0:
    print(a-b*2)
else:
    print(0)

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

Solution (Python):


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

ans = a - b*2

print(ans if ans > 0 else 0)

Solution (Python):
a,b=map(int,input().split())
if a>b*2:
    print(a-b*2)
else:
    print(0)

Solution (Python):
A,B=map(int, input().split())

if A > 2*B:
    print(A-2*B)
else:
    print(0)

Solution (Python):
A, B = list(map(int, input().split()))

ans = A - B*2

if ans <= 0:
  print(0)
else:
  print(A-B*2)

Solution (Python):
a, b = map(int, input().split())
print(max(a-2*b, 0))

Solution (Python):
a, b = list(map(int, input().split()))
print(max(a - b * 2, 0))

Solution (Python):
a,b=map(int,input().split())
print(a-b*2 if a-b*2>0 else 0)

Solution (Python):
a, b = map(int, input().split())
d = a - 2*b

if d <= 0:
  print(0)
else:
  print(d)

Solution (Python):
A,B=map(int,input().split())
if B*2 >= A:
    print(0)
else:
    print(A-B*2)

Solution (Python):
a,b=map(int, input().split())
if 2*b >= a:
    print("0")
else:
    print(a - 2*b)

Solution (Python):
A, B = map(int, input().split())
ans = max(A - 2 * B, 0)
print(ans)

Solution (Python):
A,B = map(int,input().split())

if A-B*2>0:
  print(A-B*2)
elif A-B*2<=0:
  print(0)

Solution (Python):
a,b=map(int, input().split())

if 2*b>a:
    print(0)
else:
    print(a-2*b)

Solution (Python):
a,b=map(int,input().split())
print(max(a-2*b,0))

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

Solution (Python):
A, B = map(int, input().split())

if A - B*2 <= 0:
    print(0)
else:
    print(A - B*2)

Solution (Python):
a,b=map(int,input().split())
if b>=a/2:
    print(0)
else:
    print(a-b*2)

Solution (Python):

A,B = map(int,input().split())
if 2*B >= A:
    print(0)
else:
    print(A-2*B)

Solution (Python):
a, b = map(int, input().split())
ans = a - b*2
print(ans if ans > 0 else 0)

Solution (Python):
A,B = map(int,input().split())

print(max(0,A-2*B))

Solution (Python):
A,B=map(int,input().split())

X=A-2*B

if X>=1:
    print(X)
    
else:
    print("0")

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

Solution (Python):
a,b= map(int, input().split())

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

Solution (Python):
a,b = list(map(int,input().split()))
x = a-2*b
if x<=0:
    print(0)
else:
    print(x)

Solution (Python):
A,B=map(int,input().split())
print(max(0,A-2*B))

Solution (Python):
a,b = map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
a, b = list(map(int, input().split()))
remain = a - (b * 2)
print(remain if remain >= 0 else 0)

Solution (Python):
n = [int(i) for i in input().split()]
print(max(n[0] - 2*n[1], 0))

Solution (Python):
A, B = map(int, input().split(' '))
if A > B * 2:
    print(A - B * 2)
else:
    print(0)

Solution (Python):
A, B = map(int, input().split())
print(max(A-2*B,0 ))

Solution (Python):
a,b=map(int,input().split())
if 2*b>=a:
    print(0)
else:
    print(a-(2*b))

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
a, b = map(int, input().split())  
if a - b * 2 > 0:
    print(a - b * 2)
else:
    print(0)

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

Solution (Python):






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

ans = a - b * 2

if (ans >= 0):
    print(ans)
else:
    print(0)

Solution (Python):
a,b = map(int, input().split())
ans = max(0, a-2*b)
print(ans)

Solution (Python):
a,b=list(map(int,input().split()))
b=b*2
if b>a:
  print(0)
else:
  print(a-b)

Solution (Python):
a, b = map(int, input().split())

ans = a - b * 2
if ans >= 0:
    print(ans)
else:
    print(0)

Solution (Python):
A,B=map(int,input().split())
C=A-2*B
if C>=0:
    print(C)
else:
    print("0")

Solution (Python):
a, b = list(map(int, input().split()))
if a > b * 2:
  my_result = a - b * 2
else:
  my_result = 0
print(my_result)

Solution (Python):


def main():

    A, B = map(int, input().split())

    ans = A - 2 * B
    
    if ans < 0:
        ans = 0

    print(ans)


if __name__ == "__main__":
    main()

Solution (Python):
tmp = input().split(" ")
A = int(tmp[0])
B = int(tmp[1])

print(max([A - 2 * B, 0]))

Solution (Python):
a, b = map(int, input().split())
print(a - (b * 2)) if (a - (b * 2)) > 0 else print(0)

Solution (Python):
a, b = map(int, input().split())

ans = a - 2*b

if ans < 0:
    ans = 0

print(ans)

Solution (Python):
a,b = map(int,input().split())

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

Solution (Python):
A, B = map(int, input().split())
print(max(0, A - 2 * B))

Solution (Python):


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    A, B = read_ints()
    if 2*B >= A:
        return 0
    return A-2*B


if __name__ == '__main__':
    print(solve())

Solution (Python):
a,b=map(int,input().split())

print(a-b*2 if a>=b*2 else 0)

Solution (Python):
a, b = map(int, input().split())
print(a - 2 * b if a > 2 * b else 0)

Solution (Python):
a,b = map(int, input().split())
ans = a - b*2
if ans >= 0:
  print(ans)
else:
  print(0)

Solution (Python):
a,b=map(int,input().split())

if a<=b*2:
    print(0)
else:
    print(a-b*2)

Solution (Python):
a, b = map(int, input().split())
x = max(0, a - 2*b)
print(x)

Solution (Python):
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import sys

a,b=INPUT()
if a>=2*b:
    print(a-2*b)
else:
    print(0)

Solution (Python):


















































global FLAG_LOG
FLAG_LOG = False


def log(value):
    
    
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    
    
    A, B = list(map(int, lines[0].split()))
    
    
    
    
    
    
    
    

    result = max(0, A - 2*B)

    return [result]



def get_input_lines(lines_count):
    lines = list()
    for _ in range(lines_count):
        lines.append(input())
    return lines



def get_testdata(pattern):
    if pattern == 1:
        lines_input = ['12 4']
        lines_export = [4]
    if pattern == 2:
        lines_input = ['20 15']
        lines_export = [0]
    if pattern == 3:
        lines_input = ['20 30']
        lines_export = [0]
    return lines_input, lines_export



def get_mode():
    import sys
    args = sys.argv
    global FLAG_LOG
    if len(args) == 1:
        mode = 0
        FLAG_LOG = False
    else:
        mode = int(args[1])
        FLAG_LOG = True
    return mode



def main():
    import time
    started = time.time()
    mode = get_mode()
    if mode == 0:
        lines_input = get_input_lines(1)
    else:
        lines_input, lines_export = get_testdata(mode)

    lines_result = calculation(lines_input)

    for line_result in lines_result:
        print(line_result)

    
    
    
    
    
    
    
    
    
    
    



if __name__ == '__main__':
    main()

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

Solution (Python):
a, b = [int(i) for i in input().split()]
print(max(0, a - 2 * b))

Solution (Python):
A, B = map(int, input().split())

if A <= 2*B:
    print(0)
else:
    print(A - 2*B)

Solution (Python):
a, b = map(int, input().split())
ans = max(0, a - 2 * b)
print(ans)

Solution (Python):
a,b=map(int,input().split());print([0,a-b*2][a-b*2>0])

Solution (Python):
A,B= map(int,input().split())
if B*2 >= A:
    print(0)
    quit()
print(A-(2*B))

Solution (Python):
a, b = map(int, input().split())
print(max(0, a - 2*b))

Solution (Python):
a,b = map(int,input().split())
if a > b*2:
  print(a-b*2)
else:
  print(0)

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

Solution (Python):
a, b = map(int, input().split())

ans = a - b * 2
if ans < 0:
    ans = 0

print (ans)

Solution (Python):
A,B = map(int, input().split())
if A <= 2*B:
    print(0)
else:
    print(A - 2*B)

Solution (Python):
a, b = map(int, input().split())

if a < b or a < b * 2:
    print(0)

else:
    print(a - (b * 2))

Solution (Python):

import sys
def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w') 

def main(N, arr):

	
	maxi=float("inf")

	
	ans=0

	
	for i in range(N):

		
	    maxi=min(maxi,arr[i])
	    
	    ans+=maxi
	    print("dhh")

    
	return ans
        

if __name__ == '__main__':

	
	'''N = 4

	
	Arr = [4,3,2,1]

	
	answer = main(N,Arr)

	
	print(answer)'''

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

Solution (Python):
a,b=[int(i) for i in input().split()]
c=b*2
if(c>a):
    c=a
print(a-c)

Solution (Python):
a,b=map(int,input().split())
print(max(a-2*b,0))

Solution (Python):
A, B = map(int, input().split())
print(max(A - 2 * B, 0))

Solution (Python):
A,B=map(int,input().split())
if A-2*B>0:
  print(A-2*B)
else:
  print(0)

Solution (Python):
a,b= map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
あ,い=map(int,input().split())
print(max(0,あ-い*2))

Solution (Python):
A,B = map(int,input().split())
if A > B*2:
    print(A-B*2)
elif A <= B*2:
    print(0)

Solution (Python):
a,b=map(int,input().split())
a-=2*b
if(a<0):a=0
print(a)

Solution (Python):
def resolve():
    A, B = list(map(int, input().split()))
    print(max(A-2*B, 0))
    
if '__main__' == __name__:
    resolve()

Solution (Python):
A, B = map(int, input().split())
if B * 2 >= A:
    print(0)
else:
    print(A - B * 2)

Solution (Python):
A,B=map(int,input().split())
if A-B*2<0:
    print(0)
else:
    print(A-B*2)

Solution (Python):
A,B=map(int,input().split())
print(max(0,A-B*2))

Solution (Python):
A, B = map(int, input().split())
print(max(0, A - 2 * B))

Solution (Python):
a, b = map(int, input().split())

if a - 2 * b > 0:
    print(a - 2 * b)
    
else:
    print(0)

Solution (Python):
A,B = map(int,input().split())

print(A - 2*B if A > 2*B else 0)

Solution (Python):
import sys
A,B = map(int,input().split())

if not ( 1 <= A <= 100 and 1 <= B <= 100 ): sys.exit()
if not ( isinstance(A,int) and isinstance(B,int) ): sys.exit()

print( A - (B * 2)) if A - (B * 2) >= 0 else print(0)

Solution (Python):
a,b=map(int,input().split())
ans=max(a-2*b,0)
print(ans)

Solution (Python):
A, B = map(int, input().split())
print(max(A-2*B, 0))

Solution (Python):
a,b = map(int,input().split())

print(0 if a-b*2<0 else a-b*2)

Solution (Python):
a,b = map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
A,B=map(int,input().split())

if A-(B*2)>0:
	print(A-(B*2))
else:
	print(0)

Solution (Python):
a=list(map(int,input().split()))
if a[0]>a[1]*2:
    print(a[0]-a[1]*2)
else:
    print('0')

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-2*b))

Solution (Python):



def main():
    A, B = map(int, input().split())
    print(max(0,A-2*B))

if __name__ == '__main__':
    main()

Solution (Python):
a,b=map(int,input().split())
print(max(0,a-2*b))

Solution (Python):
a,b=map(int,input().split())

if a>2*b:
    print(a-2*b)
else:
    print(0)

Solution (Python):
a, b = map(int, input().split())
print(max(0, a - b * 2))

Solution (Python):
a,b = map(int,input().split())

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

Solution (Python):
A,B=map(int, input().split())
if A-B*2<0:
    print('0')
else:
    print(A-B*2)

Solution (Python):
a, b = map(int,input().split())
print(max(0, a-2*b))

Solution (Python):
a, b = map(int,input().split())
print(max(a-b*2,0))

Solution (Python):
a, b = map(int, input().split())
if 2*b >= a:
    print(0)
else:
    print(a-2*b)

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

Solution (Python):
a,b=map(int,input().split())
val = a-2*b
print(val) if val>0 else print(0)

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

Solution (Python):
A, B = map(int, input().split())
cal = A - B * 2
if cal >= 0:
    print(cal)
else:
    print(0)

Solution (Python):
a, b = map(int, input().split())
print(max(a - 2 * b, 0))

Solution (Python):
a,b=[int(a)for a in input().split()]

c=b+b
if(a-c!=0)and(a-c>=0):
    print(a-c)
else:
    print(0)

Solution (Python):
a, b = map(int, input().split())

l = a - 2 * b

if l <= 0:
  print(0)
else:
  print(l)

Solution (Python):
import sys
import math
import itertools
import bisect
from copy import copy
from collections import deque,Counter
from decimal import Decimal
import functools
def s(): return input()
def k(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def X(): return list(input())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7
cnt = 0
ans = 0
inf = float("inf")

a,b = I()
if a <= b*2:
    print(0)
else:
    print(a-b*2)

Solution (Python):


a,b = map(int, input().split())
print(max(0,a-(b*2)))

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

Solution (Python):
a,b=map(int,input().split())
d = max(a-2*b,0)
print(d)

Solution (Python):
a,b = map(int,input().split())
print(max(a-2*b,0))

Solution (Python):
A,B=map(int,input().split())
if(A>B*2):
  print(A-B*2)
else:
  print(0)

Solution (Python):
A,B = map(int, input().split())

if A - B*2 >= 0:
    print(A - B*2)
else:
    print(0)

Solution (Python):
A, B = map(int, input().split())
if A > 2*B:
  print(A - 2*B)
else:
  print(0)

Solution (Python):
a, b = map(int,input().split())

if a > 2 * b:
    print(a - 2 * b)
else:
    print(0)

Solution (Python):
A, B = map(int, input().split())
if 2 * B >= A:
    print(0)
else:
    print(A - 2 * B)

Solution (Python):
a, b = input().split(" ")
a = int(a)
b = int(b)
if a-2*b < 0:
  print(0)
else:
  print(a-2*b)

Solution (Python):
a, b = input().split(" ")
a = int(a)
b = int(b)
if a-2*b < 0:
  print(0)
else:
  print(a-2*b)

Solution (Python):
a, b = map(int, input().split())
print(max(0, a - b * 2))

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

Solution (Python):
A,B = map(int,input().split())

if B*2>=A:
  print(0)
else:
  print(A-B*2)

Solution (Python):
A, B = map(int, input().split())
print(max(0, A-2*B))

Solution (Python):
A, B = [int(x) for x in input().split()]

print(max(A - 2 * B, 0))

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

c = a - 2*b

if c>0:
    print(c)
else:
    print("0")

Solution (Python):
a,b = map(int,input().split())
if(a > b * 2):
    print(a-b * 2)
else:
    print(0)

Solution (Python):
a,b = map(int, input().split())
if a > b * 2:
    print(a - (b * 2))
else:
    print(0)