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

Submission status: Accepted

Solution code:
x,y=list(map(int,input().split()))
if y*2<x:
  print (x-(y*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:
import math
from functools import reduce
from collections import deque
import sys
sys.setrecursionlimit(10**7)

def s(generator, splitter, mapper):
    return [ mapper(s) for s in generator().split(splitter) ]

# スペース区切りの入力を読み込んで数値リストにして返します。
def get_nums_l():
    return [ int(s) for s in input().split(" ")]

# 改行区切りの入力をn行読み込んで数値リストにして返します。
def get_nums_n(n):
    return [ int(input()) for _ in range(n)]

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

Submission status: Accepted

Solution code:
import sys

INPUT = lambda: sys.stdin.readline().rstrip()
MAP = lambda: map(int, INPUT().split())

sys.setrecursionlimit(10 ** 9)


def main():
    A, B = MAP()
    print(max(0, A - 2*B))


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    main()

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

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

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

Submission status: Accepted

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

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

    print(0)

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
n,m  = map(int, input().split())

if 2 * m <= n:
  print(n - 2 * m)
else:
  print(0)

Submission status: Accepted

Solution code:
A,B=input().split()
A=int(A)
B=int(B)
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 itertools

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
ns = input().split(" ")
a = int(ns[0])
b = int(ns[1])
if (a - 2 * b) > 0:
  print(a - 2 * b)
else:
  print(0)

Submission status: Accepted

Solution code:
"""
author : halo2halo
date : 9, Jan, 2020
"""

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
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())
ans = a-b*2

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

B2 = B*2

if A>B2:
  print(A-B2)
else:
  print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
input = sys.stdin.buffer.readline

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

Submission status: Accepted

Solution code:
# coding: utf-8
# Your code here!

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
INT = lambda: int(input())
INTM = lambda: map(int,input().split())
STRM = lambda: map(str,input().split())
STR = lambda: str(input())
LIST = lambda: list(map(int,input().split()))
LISTS = lambda: list(map(str,input().split()))
def do():
    a,b=INTM()
    print(max(0,a-2*b))
if __name__ == '__main__':
    do()

Submission status: Accepted

Solution code:

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

c=a-2*b

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin
import sys
##  input functions for me
def ria(sep = ''):
    if sep == '' :
        return list(map(int, input().split())) 
    else: return list(map(int, input().split(sep)))
def rsa(sep = ''):
    if sep == '' :
        return input().split() 
    else: return input().split(sep)
def ri(): return int(input())
def rd(): return float(input())
def rs(): return input()
##
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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

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 = [int(i) for i 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 a > b*2:
    print(a-b*2)
else:
    print("0")

Submission status: Accepted

Solution code:
def main():
	# a,b,k = map(int,input().split())
	n,k = map(int,input().split())
	# s = int(input())
	# a = list(map(int,input().split()))
	# rsp = list(str(input()))
	# l = [list(map(int, input().split())) for _ in range(n-1)]
	# s = list(s)

	if n - 2*k < 0:
		print(0)
	else:
		print(n - 2*k)

 
if __name__ == '__main__':
	main()

Submission status: Accepted

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

ans = A - 2*B

if ans < 0:
    ans = 0

print(ans)

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())
kari=a-b-b
if kari>0:
  kotae=kari
else:
  kotae=0
print(kotae)

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

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

Submission status: Accepted

Solution code:
A,B = list(map(int, input().split()))
l = A-B*2

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

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:
# -*- coding: utf-8 -*-
 
import math
import itertools
import sys
import copy
 
# 入力
A, B = map(int, input().split())
#A = int(input())
#B = int(input())

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
data = input().split(' ')
data_int = [int(data[i]) for i in range(2)]

result = data_int[0] - 2 * data_int[1]

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

Submission status: Accepted

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
x = input()
x_list = x.split(" ")
a = int(x_list[0])
b = int(x_list[1])
if a >= 2*b:
    print(a - 2*b)
else:
    print(0)

Submission status: Accepted

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

n = a - b * 2

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

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

Submission status: Accepted

Solution code:
A,B=(int(x) for x in 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())

answer = A - B * 2

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

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop, heapify
import math
import bisect
import random
from itertools import permutations, accumulate, combinations
import sys
import string
from bisect import bisect_left, bisect_right
from math import factorial, ceil, floor
from functools import reduce
import numpy as np

INF = float('inf')
def LI(): return list(map(int, sys.stdin.readline().split()))
def I(): return int(sys.stdin.readline())
def LS(): return sys.stdin.readline().split()
def S(): return sys.stdin.readline().strip()
def IR(n): return [I() for i in range(n)]
def LIR(n): return [LI() for i in range(n)]
def SR(n): return [S() for i in range(n)]
def LSR(n): return [LS() for i in range(n)]
def SRL(n): return [list(S()) for i in range(n)]
def MSRL(n): return [[int(j) for j in list(S())] for i in range(n)]
mod = 1000000007

#入力こっちの方が10倍早い
#import sys
input = sys.stdin.readline

# mainをかく
A,B=LI()
if A<B:
    print(0)
    exit()
if A-B*2>=0:
    print(A-B*2)
elif A-B*2<0:
    print(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-B*2)<0:
    print(0)
else:
    print(A-B*2)

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

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

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

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

Submission status: Accepted

Solution code:
wide = [int(i) for i in input().split()]


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

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:
import sys
a, b = map(int, sys.stdin.readline().split())

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

Submission status: Accepted

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

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

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


if __name__ == '__main__':
    solve()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(2147483647)
INF=float("inf")
MOD=10**9+7
input=lambda:sys.stdin.readline().rstrip()
def resolve():
    a,b=map(int,input().split())
    print(max(0,a-2*b))
resolve()

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:
  print(ans)
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:
from sys import stdin

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

a,b = (int(x) for x in 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 = list(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(0)
else:
    print(A - 2*B)

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

line = sys.stdin.readline()
[a, b] = line.split(" ")
print(max(int(a) - int(b) * 2, 0))

Submission status: Accepted

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

d = a - 2*b

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

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

c = a - 2 * b

print(c if c > 0 else 0)

Submission status: Accepted

Solution code:
a,b=map(int,input().split())
if 2*b<=a:
    print("{}".format(a-2*b))
else:
    print("{}".format(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(a-2*b if 2*b<a 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 = list(map(int, input().split()))
ans = A[0]-A[1]*2
if ans < 0:
    print("0")
else:
    print(ans)

Submission status: Accepted

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

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

print(ans)

Submission status: Accepted

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

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

print(ans)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline
def INT(): return int(input())
def MAP(): return [int(s) for s in input().split()]

A, B = MAP()

C = A-2*B
print(C if C>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=(int(x) for x in input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
if A>B*2:
  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:
#!/usr/bin/env python3
# -*- coding: utf-8 -*-

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

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

Submission status: Accepted

Solution code:
[print(length if length > 0 else 0) for length in [eval(input().replace(" ", "-") + "*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())

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

num = list(map(int, input().split()))
if num[0]-2*num[1]>0:
  ans=num[0]-2*num[1]
else :
  ans= 0
print(ans)

Submission status: Accepted

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

ans = a - b * 2

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

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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


def solve():
    readline = sys.stdin.buffer.readline
    mod = 10 ** 9 + 7
    a, b = list(map(int, readline().split()))
    print(max(0, a - b * 2))


if __name__ == '__main__':
    solve()

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:
import sys
input = sys.stdin.readline

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

if sys.platform =='ios':
    sys.stdin=open('input_file.txt')
    
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:
A, B = map(int, input().split())
ans = A - 2 * B
if ans < 0:
  ans = 0
print(ans)

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:
#!/usr/bin/env python3
import sys


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


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    A = int(next(tokens))  # type: int
    B = int(next(tokens))  # type: int
    solve(A, B)

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

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

else:
  print(a - cover_b)

Submission status: Accepted

Solution code:
A,B= map(int,input().split())
#v =list(map(int,input().split()))
# [list(map(int,input().split())) for i in range(N)]

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

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:
# Curtain
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-2*b if a-2*b>=0 else 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(' '))

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

Submission status: Accepted

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

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

def main():
    K = [int(x) for x in input().split()]
    ans = K[0] - 2*K[1]
    print(max(ans, 0))


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
window_w, curtain_w = input().split()
window_w = int(window_w)
curtain_w = int(curtain_w)

remaining = window_w - curtain_w * 2

if(remaining < 0): remaining = 0

print(remaining)

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