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):
ab = list(map(int, input().split()))
a = ab[0]
b = ab[1]

ans = a - b*2

if ans <= 0:
	ans = 0

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

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

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

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

ans=a-2*b

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

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

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

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

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

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

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

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

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

print(ans if ans > 0 else 0)

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

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

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

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

Solution (Python):



import sys


input = sys.stdin.readline


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

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


if __name__ == '__main__':
    main()

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

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

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

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

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

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

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

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

Solution (Python):
a,b = list(map(int,input().strip().split()))
z = b * 2
x = a - z
if a >= z:
    print(x)
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):
import sys

def solve(a, b):
    print(max(0, a - 2 * b))

if __name__ == '__main__':
    a, b = map(int, sys.stdin.readline().strip().split(" "))
    solve(a, b)

Solution (Python):

def A():
    r = input().split(" ")
    a = int(r[0])
    b = int(r[1])
    if a > 2*b:
        print(a-2*b)
    else:
        print(0)

if __name__ == '__main__':
    A()

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

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

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

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

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

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

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

Solution (Python):

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

Solution (Python):

import sys
args = sys.argv
if len(args) == 2:
  from IPython import embed
  em = True
else:
  em = False
input = sys.stdin.readline
A, B = map(int, input().split())
if A <= 2*B:
  print(0)
else:
  print(A - 2*B)
if em: sys.stdin = open('/dev/tty')

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

Solution (Python):
from collections import defaultdict, deque, Counter
import sys
import heapq
import math



sys.setrecursionlimit(1000000000)

MIN = -10 ** 9
MOD = 10 ** 9 + 7


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



if __name__ == '__main__':
    main()

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

Solution (Python):
import sys
a, b = map(int, sys.stdin.readline().split())

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

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

sukima = A - 2*B

if sukima >= 0:
	print(sukima)
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):
import sys

input = sys.stdin.readline


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



if __name__ == '__main__':
    AtCoder().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())
a=a-b*2
if a<=0:
    print('0')
else:
    print(a)

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

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

print(ans)

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

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

Solution (Python):
import sys


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

isTest=False

def pa(v):
	if isTest:
		print(v)

if __name__ == "__main__":
	if sys.platform =='ios':
		sys.stdin=open('inputFile.txt')
		isTest=True
	else:
		pass
		
			
	ret = main()
	if ret is not None:
		print(ret)

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

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

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

if x <= 2 * y:
  print (0)
else:
  print(x - 2 * y)

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

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

res = A - B * 2

if res < 0:
    res = 0

print(res)

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

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

Solution (Python):
a,b = (int(i) for i in 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 = map(int, input().split())

r = a - 2 * b

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

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

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

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

print(ans)

Solution (Python):

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

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

b*=2

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

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

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

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


if __name__ == "__main__":
    test()

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

a = int(a)

b = int(b)

answer = a - 2*b

if answer < 0:
    print('0')
else:
    print(answer)

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

solve()

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

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

Solution (Python):

"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""

import numpy as np
import sys
import collections
import scipy.misc
import math
from operator import itemgetter
import itertools
import copy
import bisect
import heapq


def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   

def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

def find_index(l, x, default=False):
    if x in l:
        return l.index(x)
    else:
        return default

class UnionFind(object):
    def __init__(self, n=1):
        self.par = [i for i in range(n)]
        self.rank = [0 for _ in range(n)]
        self.size = [1 for _ in range(n)]

    def find(self, x):
        """
        x が属するグループを探索
        """
        if self.par[x] == x:
            return x
        else:
            self.par[x] = self.find(self.par[x])
            return self.par[x]

    def union(self, x, y):
        """
        x と y のグループを結合
        """
        x = self.find(x)
        y = self.find(y)
        if x != y:
            if self.rank[x] < self.rank[y]:
                x, y = y, x
            if self.rank[x] == self.rank[y]:
                self.rank[x] += 1
            self.par[y] = x
            self.size[x] += self.size[y]

    def is_same(self, x, y):
        """
        x と y が同じグループか否か
        """
        return self.find(x) == self.find(y)

    def get_size(self, x):
        """
        x が属するグループの要素数
        """
        x = self.find(x)
        return self.size[x]
    



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

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

    
if __name__ == '__main__':
    main()



"""
N, X = map(int, input().split())

x = list(map(int, input().split()))

P = [0]*N
Y = [0]*N
for n in range(N):
    P[n], Y[n] = map(int, input().split())


all(nstr.count(c) for c in '753')


ABT = zip(A, B, totAB)

A, B, totAB = zip(*ABT)


(x >> i) & 1


dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break

add = 1 
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)


li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    


org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)




    for h in range(0,H):
        for w in range(0,W):
            if h == 0 and w == 0:
                pass
            elif h == 0:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h-1][W-w]+1)
            elif w == 0:   
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1)
            else:
                D[H-h-1][W-w-1]= min(D[H-h-1][W-w-1], D[H-h][W-w-1]+1, D[H-h-1][W-w]+1, D[H-h][W-w]+2)
            d_max = max(D[H-h-1][W-w-1], d_max)

"""

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())
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 ans < 0 :
    print(0)
else :
    print(ans)

Solution (Python):
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import copy




'''
条件に合うものを絞り込む
data = [1, 2, 3]
s = [x for x in data if x % 3 == 0]
'''

'''
文字配列を数値に
l_si = ['-10', '0', '100']

l_si_i = [int(s) for s in l_si]
'''

'''
a = [2, 4, 6, 8]
b = [3, 6, 9]

print(list(set(a) | set(b)))  
print(list(set(a) & set(b)))  
'''

'''
N = int(stdin.readline().rstrip())
A = [int(x) for x in stdin.readline().rstrip().split()]
count = 0
while len([x for x in A if x % 2 == 0]) == N:
    A = list(map(lambda y: y / 2, A))
    count += 1
print(count)
'''

'''
.append(要素)
.extend(要素)
.insert(場所,要素)
-1で末尾で末尾から一つ前
'''
'''
間に空白追加
' '.join(lis)
'''
'''
copy.copy(配列名)
'''

tes = stdin.readline().rstrip().split()
a = int(tes[0])
b = int(tes[1])
res = a - b * 2
if (res <= 0):
    print(0)
else:
    print(res)

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

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

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

Solution (Python):

from fractions import gcd

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect
import re


ii = lambda : int(input())
mi = lambda : map(int,input().split())
li = lambda : list(map(int,input().split()))



def main():
    a,b = mi()
    print(max(a-2*b,0))

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

a = A - 2 * B

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

Solution (Python):
[A, B] = [int(i) for i in 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-(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())
rest = A - 2 * B
if(rest > 0):
    print(rest)
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 = map(int, input().split())
diff = A - 2 * B
if diff > 0:
  print(diff)
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):
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')

A,B = inpl()

ans =A-2*B

if ans <0:
    ans =0

print(ans)

Solution (Python):
A, B = map(int, input().split())
ans = A - B * 2
if ans <= 0:
    print('0')
else:
    print(str(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):
from sys import stdin

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

tmp = A - 2 * B

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

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



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

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

ans = a - b*2

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

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

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

    ans = a - b*2

    ans = 0 if ans <=0 else ans

    print(ans)
    
resolve()

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

import sys


def solve(A: int, B: int):
    print(max(A-B*2,0))
    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())
s = a - b * 2
if s < 0:
  print(0)
else:
  print(s)

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

Solution (Python):

import sys


def solve(A: int, B: int):
    print(A - B * 2 if A - B * 2 >= 0 else 0)
    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())
ans = a - b*2

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

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

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

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

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

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

result = None

result = a - b * 2

if result < 0:
    result = 0

print(result)

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

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

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

Solution (Python):

import sys


def solve(A: int, B: int):
    if A <= B*2:
        print(0)
    else:
        print(A-B*2)
    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())
print(max(a-2*b,0))

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

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

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 <= 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 = list(map(int,input().split()))

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

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

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

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

Solution (Python):
if __name__ == '__main__':
   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:
    ans = 0
print(ans)

Solution (Python):

from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

if sys.version_info[0] < 3:
    from __builtin__ import xrange as range
    from future_builtins import ascii, filter, hex, map, oct, zip


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

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




BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

    def __init__(self, file):
        self._fd = file.fileno()
        self.buffer = BytesIO()
        self.writable = "x" in file.mode or "r" not in file.mode
        self.write = self.buffer.write if self.writable else None

    def read(self):
        while True:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            if not b:
                break
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines = 0
        return self.buffer.read()

    def readline(self):
        while self.newlines == 0:
            b = os.read(self._fd, max(os.fstat(self._fd).st_size, BUFSIZE))
            self.newlines = b.count(b"\n") + (not b)
            ptr = self.buffer.tell()
            self.buffer.seek(0, 2), self.buffer.write(b), self.buffer.seek(ptr)
        self.newlines -= 1
        return self.buffer.readline()

    def flush(self):
        if self.writable:
            os.write(self._fd, self.buffer.getvalue())
            self.buffer.truncate(0), self.buffer.seek(0)


class IOWrapper(IOBase):
    def __init__(self, file):
        self.buffer = FastIO(file)
        self.flush = self.buffer.flush
        self.writable = self.buffer.writable
        self.write = lambda s: self.buffer.write(s.encode("ascii"))
        self.read = lambda: self.buffer.read().decode("ascii")
        self.readline = lambda: self.buffer.readline().decode("ascii")


def print(*args, **kwargs):
    """Prints the values to a stream, or to sys.stdout by default."""
    sep, file = kwargs.pop("sep", " "), kwargs.pop("file", sys.stdout)
    at_start = True
    for x in args:
        if not at_start:
            file.write(sep)
        file.write(str(x))
        at_start = False
    file.write(kwargs.pop("end", "\n"))
    if kwargs.pop("flush", False):
        file.flush()


if sys.version_info[0] < 3:
    sys.stdin, sys.stdout = FastIO(sys.stdin), FastIO(sys.stdout)
else:
    sys.stdin, sys.stdout = IOWrapper(sys.stdin), IOWrapper(sys.stdout)

input = lambda: sys.stdin.readline().rstrip("\r\n")



if __name__ == "__main__":
    main()

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

c = a - (b * 2)

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

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

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

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

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

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

left = A - (B*2)

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

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

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

Solution (Python):

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

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

Solution (Python):

from sys import stdin

A, B = stdin.readline().rstrip().split()
A = int(A)
B = int(B)

ans = A-B*2

if ans < 0:
    ans = 0

print(ans)

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

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

Solution (Python):




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


if __name__ == '__main__':
  main()

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

print(ans)

Solution (Python):
import sys
MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)
def IL(): return list(map(int,input().split()))
def SL(): return input().split()
def I(): return int(sys.stdin.readline())
def S(): return input()

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

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


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

Solution (Python):

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

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

print(result)

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())
ans = max(A - 2*B, 0)
print(ans)

Solution (Python):
import sys

input = sys.stdin.readline

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

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

print(ans)

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

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

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

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

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

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

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

Solution (Python):


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

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 = [int(i) for i in input().split()]
print(max(a - 2*b, 0))

Solution (Python):
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Solution (Python):


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

ans = A - 2 * B

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

Solution (Python):



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


if __name__ == '__main__':
    A, B = map(int, input().split())

    ans = solve(A, B)

    print(ans)

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

x = A - (2 * B)

if x >= 0:
	print(x)
elif x < 0:
	print(0)

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

Solution (Python):
data = input().split(" ")
a = int(data[0])
b = int(data[1])
c = a - 2 * b
if c >= 0:
	print(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=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-B-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(a - 2*b if a>=2*b else 0)

Solution (Python):
from sys import stdin


def main():
    input = lambda: stdin.readline()[:-1]
    A, B = map(int, input().split())

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


main()

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

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