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.



Sample input:
12 4


Sample output:
4

Submission status: Accepted

Solution code:
# abc143_a.py
# https://atcoder.jp/contests/abc143/tasks/abc143_a

# A - Curtain /
# 実行時間制限: 2 sec / メモリ制限: 1024 MB
# 配点 : 100点

# 問題文
# 高橋君の家の窓の横方向の長さは Aであり、横方向の長さが B のカーテンが 2枚取り付けられています。
# (カーテンは縦方向には窓を覆うのに十分な長さがあります。)
# 窓のうちカーテンで隠されていない部分の横方向の長さが最小になるようにカーテンを閉めます。 
# このとき、窓のカーテンで隠されていない部分の合計の横方向の長さを求めてください。

# 制約
#     1≤A≤100
#     1≤B≤100
#     A,Bは整数である。

# 入力
# 入力は以下の形式で標準入力から与えられる。
# A B

# 出力
# 窓のうちカーテンで隠されていない部分の合計の横方向の長さを出力せよ。

# 入力例 1
# 12 4

# 出力例 1
# 4

# 横幅 12の窓の、例えば両端からの距離が 4 以内の部分が隠されます。カーテンで隠されない部分の横方向の長さは 4です。

# 入力例 2
# 20 15

# 出力例 2
# 0

# 窓がカーテンで完全に隠される場合は 0と出力してください。

# 入力例 3
# 20 30

# 出力例 3
# 0

# 各カーテンが窓の横幅より長い場合があります。


global FLAG_LOG
FLAG_LOG = False


def log(value):
    # FLAG_LOG = True
    # FLAG_LOG = False
    if FLAG_LOG:
        print(str(value))


def calculation(lines):
    # S = lines[0]
    # N = int(lines[0])
    A, B = list(map(int, lines[0].split()))
    # values = list(map(int, lines[1].split()))
    # values = list(map(int, lines[2].split()))
    # values = list()
    # for i in range(N):
    #     values.append(int(lines[i]))
    # valueses = list()
    # for i in range(N):
    #     valueses.append(list(map(int, lines[i+1].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 mode > 0:
    #     print(f'lines_input=[{lines_input}]')
    #     print(f'lines_export=[{lines_export}]')
    #     print(f'lines_result=[{lines_result}]')
    #     if lines_result == lines_export:
    #         print('OK')
    #     else:
    #         print('NG')
    # finished = time.time()
    # duration = finished - started
    # print(f'duration=[{duration}]')


# 起動処理
if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print (ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
# cook your dish here
import sys
def file():
	sys.stdin = open('input.py', 'r')
	sys.stdout = open('output.py', 'w') 
#file()	
def main(N, arr):

	#initialising with positive infinity value
	maxi=float("inf")

	#initialising the answer variable
	ans=0

	#iterating linesrly
	for i in range(N):

		#finding minimum at each step
	    maxi=min(maxi,arr[i])
	    #increasing the final ans
	    ans+=maxi
	    print("dhh")

    #returning the answer
	return ans
        

if __name__ == '__main__':

	#length of the array
	'''N = 4

	#Maximum size of each individual bucket
	Arr = [4,3,2,1]

	#passing the values to the main function
	answer = main(N,Arr)

	#printing the result
	print(answer)'''

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin python3
# -*- coding: utf-8 -*-

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

#print(type(c))

Submission status: Accepted

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

l = a - 2 * b

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
a,b = map(int, input().split())
print(max(0,a-(b*2)))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

c = a - 2*b

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

b *= 2

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.readline
A,B =list(map(int,input().split()))
print(max(0,A-2*B))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
x,y=map(int,input().split())
print(max(x-2*y,0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python

import sys
input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**6)
INF = float("inf")

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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# from collections import Counter
# n = int(input())
# li = list(map(int, input().split()))
a, b = map(int, input().split())

# n = int(input())

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

Submission status: Accepted

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

len_ = A-2*B

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

c = A-(2*B)

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

else:
    print(c)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


# input = sys.stdin.readline

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

if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
a,b=map(int,input().split())
print((a-b*2)*(a>b*2)or 0)

Submission status: Accepted

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

Submission status: Accepted

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

t = a-2*b

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print(max(0,eval(input().replace(' ','-2*'))))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#<ABC.143>
#<A>
a, b = map(int,input().split())
if b * 2 < a:
    print(a - b * 2)
else:
    print(0)

Submission status: Accepted

Solution code:
import sys

def S(): return sys.stdin.readline().rstrip()

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
import sys

read = sys.stdin.read
readline = sys.stdin.readline
readlines = sys.stdin.readlines
sys.setrecursionlimit(10 ** 9)
INF = 1 << 60
MOD = 1000000007


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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

ans=a-b*2

if ans>=0:
    print(ans)

else:
    print('0')

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def curtain(x,y):
  if (2*b>=a):
    return 0;
  else:
    return (a-(2*b))
a,b=map(int,input().split())
print(curtain(a,b))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = lambda: sys.stdin.readline().rstrip()

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# 143 A

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a1=input()
a2=[i for i in a1.split()]
a3,a4=[a2[i] for i in (0,1)]
A,B=int(a3),int(a4)
print(max(0,A-2*B))

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(4100000)
import math
INF = 10**9
import itertools

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

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


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import math
import sys
from collections import deque
import heapq
import copy
import itertools
from itertools import permutations
def mi() : return map(int,sys.stdin.readline().split())
def ii() : return int(sys.stdin.readline().rstrip())
def i() : return sys.stdin.readline().rstrip()
a,b=mi()
print(max(a-b-b,0))

Submission status: Accepted

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

if __name__ ==  "__main__":
    main()

Submission status: Accepted

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

if __name__ == '__main__':
    solve()

Submission status: Accepted

Solution code:
import sys
a,b=map(int,input().split())
if a<=b*2:
  print('0')
  sys.exit()
print(a-b*2)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
print((lambda x:max(x[0]-2*x[1],0))(list(map(int,input().split()))))

Submission status: Accepted

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

Submission status: Accepted

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

result = a - b * 2

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
A, B = [int(s) for s in input().split()]
print(A - 2 * B if A - 2 * B > 0 else 0)

Submission status: Accepted

Solution code:
import os, sys, re, math

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
# 0を下回ることはないから最低ラインで0を設定
print(max(A - B * 2, 0))

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
print("{}".format(0 if (A - 2*B <= 0) else A - 2*B))

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
A - Curtain
https://atcoder.jp/contests/abc143/tasks/abc143_a

"""
import sys


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


def main(args):
    A, B = map(int, input().split())
    ans = solve(A, B)
    print(ans)


if __name__ == '__main__':
    main(sys.argv[1:])

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys
from collections import defaultdict
readline = sys.stdin.buffer.readline
#sys.setrecursionlimit(10**8)


def geta(fn=lambda s: s.decode()):
    return map(fn, readline().split())


def gete(fn=lambda s: s.decode()):
    return fn(readline().rstrip())


def main():
    a, b = geta(int)

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys

input = lambda: sys.stdin.readline().rstrip()


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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

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