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(0)
else:
  print(A - (B*2))

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

Solution (Python):
total,l=map(int,input().split(' '))
print(max(0,total-2*l))

Solution (Python):






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





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

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


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

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

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

Solution (Python):
def main():
    A, B = [int(n) for n in input().split()]
    print(max(A-2 * B, 0))
main()

Solution (Python):
A, B = 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(0)
else:
  print(ans)

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

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

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

r = a[0] - a[1]
if r <= 0:
  print(0)
else:
  r = r - a[1]
  if r <= 0:
    print(0)
  else:
    print(r)

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, raw_input().split())

if a < b or a < 2*b:
  print 0
else:
  print a - 2*b

Solution (Python):
from sys import stdin
A, B = [int(x) for x in stdin.readline().rstrip().split()]
if A > 2*B:
  print(A - 2*B)
elif A <= 2*B:
  print(0)

Solution (Python):
def Curtain(A, B):
    rest = A - (B * 2)
    if rest > 0:
        return rest
    else:
        return 0

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

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

c = a - 2 *b

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

Solution (Python):
list = input().split()

a = int(list[0])
b = int(list[1])

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

Solution (Python):
IN = input().split()

A = int(IN[0])
B = int(IN[1])
if A-2*B<=0:
    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 = list(map(int,input().split()))

if A >= B*2:
  print(A-B*2)
  
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 = 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())

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

Solution (Python):
n ,m = map(int,input().split())
t = m*2
r = n-t
if r>=0:
  print(r)
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 = 0
nokori = a - 2*b
if  nokori <= 0:
    ans = 0
else:
    ans = nokori

print(ans)

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()))
c = a - 2*b
if c>0:
    print(c)
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())
if a <= b*2:
    print(0)
else:
    print(a-(b*2))

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

Solution (Python):
def solve_a(a, b):
    res = max(0, a - 2 * b)
    return res


def main():
    a, b = map(int, input().split())
    res = solve_a(a, b)
    print(res)


def test():
    assert solve_a(12, 4) == 4
    assert solve_a(20, 15) == 0
    assert solve_a(20, 30) == 0


if __name__ == "__main__":
    test()
    main()

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

    if a < (b * 2):
        print(0)
    else:
        print(a - (b * 2))
        
if __name__ == '__main__':
    answer()

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(A - min(2*B,A))

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

Solution (Python):
temp = input().split()
a = int(temp[0])
b = int(temp[1])

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

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

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

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

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):
import sys

input = sys.stdin.readline
A, B = [int(x) for x in input().split()]

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

Solution (Python):
N = input().split()
a = int(N[0])
b = int(N[1])

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

Solution (Python):
import sys

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

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*2>0:
  print (A-B*2)
else:
  print (0)

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

ans=a-b*2

if(ans<0):
    ans=0

print(ans)

Solution (Python):
import numpy as np

input_str = input()
input_list = input_str.split(" ")


window_length = int(input_list[0])
curtain_length = int(input_list[1])


not_covered_length = None

if window_length < curtain_length*2:
    not_covered_length = 0
else:
    not_covered_length = window_length - curtain_length*2


print(not_covered_length)

Solution (Python):

import sys


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


def main():
    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))  
    solve(A, B)


if __name__ == '__main__':
    main()

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

r = a-2*b

print(r) if r >=0 else print(0)

Solution (Python):
a, b = map(int, input().split())
print(max(0, 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 - 2 * b))

Solution (Python):


A, B = map(int, input().split())
print('{}'.format(max(A-2*B, 0)))

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

Solution (Python):
a, b = (int(x) for x in input().split())
print(0) if a <= 2 * b 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(' '))
print(max(0, a-2*b))

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

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

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

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

w = a - (b*2)

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

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

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

Solution (Python):
a, b = input().split()
num_a = int(a)
num_b = int(b)
dif = num_a - num_b*2
if dif >= 0:
  print(dif)
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 = tuple(input().split(' '))
output = int(A) - (2 * int(B))
if output < 0:
    output = 0

print(output)

Solution (Python):
a,b = list(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(0)
else:
    print(A-2*B)

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

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

Solution (Python):


Input1 = [input() for i in range(1)]
A,B = list(map(int,Input1[0].split()))
ans = A-2*B
if ans < 0:
    ans = 0
print(ans)

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

Solution (Python):
import numpy as np
a,b=list(map(int,input().split(' ')))
print(np.where(a-2*b>0,a-2*b,0))

Solution (Python):
s = input().split()
r= int(s[0]) - int(s[1]) * 2



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

Solution (Python):
numList = input().split()
windowWidth = int(numList[0])
curtainsWidth = int(numList[1]) * 2
uncovered = windowWidth -  curtainsWidth



if uncovered <= 0:
    print("0")
else:
    print(uncovered)

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

Solution (Python):
def inpl(): return list(map(int, input().split()))

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

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

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

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

Solution (Python):


import sys

a,b = [ int(x) for x in sys.stdin.readline().strip().split() ]

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

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

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

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

Solution (Python):
A, B = [int(_) for _ in input().split()]
print(max(A - 2 * B, 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())
print(max(0, a-2*b))

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

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

Solution (Python):
import sys


def input(): return sys.stdin.readline().strip()


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


if __name__ == "__main__":
    main()

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

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

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

if l[0]<l[1]*2:
  print(0)
else:
  print(l[0]-l[1]*2)

Solution (Python):

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


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

Solution (Python):
a = input()
b = a.split()

if (int(b[0])-2*int(b[1]) >= 0):
  print(int(b[0])-2*int(b[1]))
else:
  print(0)

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

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

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

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

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(0 if (A-2*B)<0 else A-2*B)

Solution (Python):
A,B=map(int,input().split())
rest = A - B*2
if rest>0:
    print(rest)
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-2*b<=0:
	print(0)
else:
	print(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())
ans=0
if a>2*b:
    ans=a-2*b
print(ans)

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

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

if A < answer:
    answer = 0
else:
    answer = A - answer

print(answer)

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):
def main():
    width_of_window,width_of_cartain = map(int,input().split())
    print(cover_window(width_of_window,width_of_cartain))

def cover_window(width_of_window,width_of_cartain):
    if width_of_window <= width_of_cartain*2:
        return 0
    else:
        return width_of_window - width_of_cartain*2

main()

Solution (Python):
A, B = map(int, input().split())
print(max(A-2*B, 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*2:
    print(A-(B*2))
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())
                                
A =a                            
B =b    
        
C = A - B*2
if C < 0:
  C = 0
print(C)

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

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

Solution (Python):
n1, n2 = [int(i) for i in input().split()]

r1 = n1 - (n2 * 2)

if r1 < 0:
    r1 = 0

print(r1)

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

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

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 - 2 * b
if ans <= 0:
    print(0)
else:
    print(ans)

Solution (Python):
A,B = map(int, input().strip().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):
x,y = map(int,input().split())	
print(max(0,x-2*y))

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:
    ans = 0

else:
    ans = A-2*B

print(ans)

Solution (Python):
import math

i = input().split(" ")


a = i[0]
b = i[1]
r = max((int(a) - 2 * int(b)), 0)

print(r)

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

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



Blong = i[1]*2
Ans = i[0] - Blong

if Ans >= 0:
    print(Ans)
elif Ans < 0:
    print("0")

Solution (Python):
data = input().split(" ")

window = int(data[0])
curtain = int(data[1])

if curtain * 2 >= window:
    print(0)
else:
    print(window - curtain * 2)

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

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

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

main()

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

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())
 

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

print(res)

Solution (Python):


''' 
------------------------
author : iiou16
------------------------
'''

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

if __name__ == '__main__':
    main()

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 - 2*B >= 0:
    print(A-2*B)
else:
    print(0)

Solution (Python):

import sys


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



def main():
    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))  
    solve(A, B)

if __name__ == '__main__':
    main()

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

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

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

Solution (Python):
a,b = input().split()
A = int(a)
B = int(b)
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(a-2*b)
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(' '))
C = A - 2 * B
D = max([C, 0])
print(D)

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

Solution (Python):
a,b = map(int,input().split())
r = a - b*2
if r >= 0:
  print(r)
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 = input().split()
A = int(A)
B = int(B)

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

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())

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

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

Solution (Python):
x,y = map(int,input().split())
ans = x - y*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 = map(int, input().split())
print(max(0, A - 2 * B))

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

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


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

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

if result <= 0:
  result = 0

print(result)

Solution (Python):
A, B = (int(i) for i in input().split())
if A<=B*2:
	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())
if A <= 2*B:
  print(0)
else:
  print(A-2*B)

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

Solution (Python):
_a, _b = map(int, input().split())

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


hoge(_a, _b)

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

Solution (Python):
a,b=map(int,input().split())
if a > 2*b:
    print(int(a-2*b))
else:
    print(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-b*2))

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

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

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

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

Solution (Python):
(total_width, curtain_width) = list(map(int, input().split()))

if (curtain_width * 2) > total_width:
    print(0)
else:
    print(total_width - curtain_width * 2)

Solution (Python):
A_B=input().split()
A=int(A_B[0])
B=int(A_B[1])
if A-2*B>=0:
    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(A - 2 * B, 0))

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

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 b * 2 >= a:
    print(0)
else:
    print(a - b * 2)

Solution (Python):
from copy import deepcopy
from sys import exit,setrecursionlimit
import math
from collections import defaultdict,Counter,deque
from fractions import Fraction as frac
import bisect
import sys
input = sys.stdin.readline

setrecursionlimit(1000000)

dp = defaultdict(lambda x:-1)

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

def zip(a):
	mae = a[0]
	ziparray = [mae]
	for i in range(1,len(a)):
		if(mae != a[i]):
			ziparray.append(a[i])
			mae = a[i]
	return ziparray

def is_prime(n):
	if n < 2: return False

	for k in range(2, int(math.sqrt(n)) + 1):
		if n % k == 0:
			return False

	return True

def list_replace(n,f,t):
	return [t if i==f else i for i in n]

def base_10_to_n(X, n):
	X_dumy = X
	out = ''
	while X_dumy>0:
		out = str(X_dumy%n)+out
		X_dumy = int(X_dumy/n)
	if(out == ''): return '0'
	return out

def gcd(l):
	x = l.pop()
	y = l.pop()
	while(x%y!=0):
		z = x%y
		x = y
		y = z
	l.append(min(x,y))
	return gcd(l) if len(l) > 1 else l[0]

class Queue():
	def __init__(self):
		self.q = deque([])
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.popleft()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class Stack():
	def __init__(self):
		self.q = []
	def push(self,i):
		self.q.append(i)
	def pop(self):
		return self.q.pop()
	def size(self):
		return len(self.q)
	def debug(self):
		return self.q

class graph():
	def __init__(self):
		self.graph = defaultdict(list)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
		self.graph[t].append(f)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
		self.graph[t].remove(f)
	def linked(self,f):
		return self.graph[f]

class dgraph():
	def __init__(self):
		self.graph = defaultdict(set)
	def addnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].append(t)
	def rmnode(self,l):
		f,t = l[0],l[1]
		self.graph[f].remove(t)
	def linked(self,f):
		return self.graph[f]

main()

Solution (Python):
a, b = map(int, input().split())
res =a-2*b
print(max(res,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())
ans = a - (b*2)

print(max(0,ans))

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

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

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

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

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

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

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

Solution (Python):



def solve(*args: str) -> str:
    a, b = map(int, args[0].split())
    return str(max(a-(2*b), 0))


if __name__ == "__main__":
    print(solve(*[input() for _ in range(1)]))

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:
    print(0)
else:
    print(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())
ans = max (0, a - b*2)
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())

s = B * 2
i = A - B * 2

if s < A:
  print(i)
else:
  print(0)

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

Solution (Python):
N=input()
N=N.split()
N=[int(item) for item in N]
A=N[0]
B=N[1]
ans=A-B*2
if ans<0:
    ans=0
print(ans)

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

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

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


k = AB[0] - AB[1]*2

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

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

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

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

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

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

ans = max(0, a - (2*b))

print(ans)

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

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

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

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

Solution (Python):


import sys

debug = False

def log(text):
    if debug:
        print(text)

def parse_input(lines_as_string = None):

    global debug
    lines = []
    if lines_as_string is None:
        debug = False
        
        
        lines.append(input())
    else:
        debug = True
        lines = [e for e in lines_as_string.split("\n")][1:-1]

    (a, b) = [int(e) for e in lines[0].split(" ")]

    return (a, b)


def solve(a, b):

    return max(a - 2 * b, 0)


def main():
    
    result = solve(*parse_input())
    if isinstance(result, list):
        for r in result:
            print("%s" % r, sep='')
    else:
        print("%s" % result, sep='')

if __name__ == '__main__':

    main()

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

length = int(A) - int(B)*2
if length < 0:
  length = 0

print(length)

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

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-B*2>0:
    print(A-B*2)
else:
    print(0)

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

len=A-B*2

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

Solution (Python):
import sys
n = list(map(int, input().split()))
result = n[0] - n[1] * 2
if result < 0:
  print(0)
  quit()

print(result)

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

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())

b = b*2

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

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

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

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

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

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

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

if A < 2*B:
    print(0)

Solution (Python):



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

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

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

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())
L=A-2*B
if L<0:
  L=0
print(L)

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, raw_input().split())
res = A - 2*B
if res <= 0:
        res = 0
print(res)

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

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

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

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

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

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, raw_input().split())
print max(0, a - b * 2)

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

ans = max(0,a-2*b)

print(ans)

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:
    print('0')
else:
    print(A - 2 * B)

Solution (Python):


A, B = map(int, input().split())
C = A - 2*B

if(C >= 0):
    print("{}".format(C))
else:
    print(0)

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 2*b >= a:
	print(0)
else:
  print(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())
if a>2*b:
	c=a-2*b
	print(c)
else:
	print(0)

Solution (Python):
ABlow = input().split()

A = int(ABlow[0])
B = int(ABlow[1])

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

Solution (Python):
a, b = map(int, input().split())
print(max(a-b*2, 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 = [int(x) for x in input().split()]
ans = A-B*2
if ans < 0:
    print(0)
else:
    print(ans)

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

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

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

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

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

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 2*b>a:
  print(0)
else:
  print(a-2*b)

Solution (Python):
A, B = map(int,input().split())
def curtain(a,b):
    l = a - 2 * b
    if l > 0:
        return l
    else:
        return 0
print(curtain(A,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())
ans=a-b*2
if ans>0:
	print(ans)
else:
	print('0')

Solution (Python):
from sys import stdin
 
lines = stdin.readlines()
 
A,B = map(int, lines[0].split())

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

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

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