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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
import sys
import math
from bisect import bisect_left
from bisect import bisect_right
import collections
import copy
import heapq
from collections import defaultdict
from heapq import heappop, heappush
import itertools
input = sys.stdin.readline
from collections import defaultdict
from heapq import heappop, heappush

from decimal import *

##### リストの 二分木検索 #####
# bisect_left(lists, 3)
# bisect_right(lists, 3)

##### プライオリティキュー #####
# heapq.heapify(a) #リストaのheap化
# heapq.heappush(a,x) #heap化されたリストaに要素xを追加
# heapq.heappop(a) #heap化されたリストaから最小値を削除＆その最小値を出力

# heapq.heappush(a, -x) #最大値を取り出す時は、pushする時にマイナスにして入れよう
# heapq.heappop(a) * (-1) #取り出す時は、-1を掛けて取り出すこと

##### タプルリストのソート #####
# sorted(ans) #(a, b) -> 1st : aの昇順, 2nd : bの昇順
# sorted(SP, key=lambda x:(x[0],-x[1])) #(a, b) -> 1st : aの昇順, 2nd : bの降順
# sorted(SP, key=lambda x:(-x[0],x[1])) #(a, b) -> 1st : aの降順, 2nd : bの昇順
# sorted(SP, key=lambda x:(-x[0],-x[1])) #(a, b) -> 1st : aの降順, 2nd : bの降順

# sorted(SP, key=lambda x:(x[1])) #(a, b) -> 1st : bの昇順
# sorted(SP, key=lambda x:(-x[1])) #(a, b) -> 1st : bの降順

##### 累乗 #####
# pow(x, y, z) -> x**y % z

##### 割り算の切り上げ #####
# tmp = -(-4 // 3)

##### dict の for文 #####
# for k, v in d.items():
#     print(k, v)

##### 進数の変換 #####
# bin_str = bin(i)[2:]
# oct_str = oct(i)[2:]
# hex_str = hex(i)[2:]

##### とても大きな数 と 小数の計算誤差 #####
# 「Decimal」は計算誤差を 0にできる。必要に応じて粒度を設定せよ。
# getcontext().prec = 100
#
# tmp = Decimal(i)
# A,B = map(Decimal, input().split())
# ans = A * B

def inputInt(): return int(input())
def inputMap(): return map(int, input().split())
def inputList(): return list(map(int, input().split()))
def inputStr(): return input()[:-1]

inf = float('inf')
mod = 1000000007

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-

def main():
	A,B = inputMap()

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



#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# 2分検索のリバース
def bisect_left_reverse(a, x):
    if a[0] <= x:
        return 0
    if x < a[-1]:
        return len(a)
    # 二分探索
    ok = len(a) - 1
    ng = 0
    while (abs(ok - ng) > 1):
        mid = (ok + ng) // 2
        if a[mid] <= x:
            ok = mid
        else:
            ng = mid
    return ok

def bisect_right_reverse(a, x):
    if a[0] < x:
        return 0
    if x <= a[-1]:
        return len(a)
    # 二分探索
    ok = len(a) - 1
    ng = 0
    while (abs(ok - ng) > 1):
        mid = (ok + ng) // 2
        if a[mid] < x:
            ok = mid
        else:
            ng = mid
    return ok

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# 2分検索
# 存在しない場合: None 存在する場合: その値
def binary_search(list, item):
    low = 0
    high = len(list) - 1

    while low <= high:
        mid = (low + high) //2
        guess = list[mid]
        if guess == item:
            return mid
        if guess > item:
            high = mid -1
        else:
            low = mid + 1
    return None

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# N 個のボールを K グループに分ける場合のパターン数
def sunuke(N, K, mod=10**9+7):
	if N < K or K-1 < 0:
		return 0
	else:
		return combination(N-1, K-1, mod)

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# nCr mod m
# rがn/2に近いと非常に重くなる
def combination(n, r, mod=10**9+7):
    r = min(r, n-r)
    res = 1
    for i in range(r):
        res = res * (n - i) * modinv(i+1, mod) % mod
    return res

# mを法とするaの乗法的逆元
def modinv(a, mod=10**9+7):
    return pow(a, mod-2, mod)

def egcd(a, b):
    if a == 0:
        return b, 0, 1
    else:
        g, y, x = egcd(b % a, a)
        return g, x - (b // a) * y, y

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# nHr mod m
# 問題によって、combination()を切り替えること
def H(n, r, mod=10**9+7):
	# comb = Combination(n+r-1, mod)
	# return comb(n+r-1, r)
    return combination(n+r-1, r, mod)


class Combination:
    """
    O(n)の前計算を1回行うことで，O(1)でnCr mod mを求められる
    n_max = 10**6のとき前処理は約950ms (PyPyなら約340ms, 10**7で約1800ms)
    使用例：
    comb = Combination(1000000)
    print(comb(5, 3))  # 10
    """
    def __init__(self, n_max, mod=10**9+7):
        self.mod = mod
        self.modinv = self.make_modinv_list(n_max)
        self.fac, self.facinv = self.make_factorial_list(n_max)

    def __call__(self, n, r):
        return self.fac[n] * self.facinv[r] % self.mod * self.facinv[n-r] % self.mod

    def make_factorial_list(self, n):
        # 階乗のリストと階乗のmod逆元のリストを返す O(n)
        # self.make_modinv_list()が先に実行されている必要がある
        fac = [1]
        facinv = [1]
        for i in range(1, n+1):
            fac.append(fac[i-1] * i % self.mod)
            facinv.append(facinv[i-1] * self.modinv[i] % self.mod)
        return fac, facinv

    def make_modinv_list(self, n):
        # 0からnまでのmod逆元のリストを返す O(n)
        modinv = [0] * (n+1)
        modinv[1] = 1
        for i in range(2, n+1):
            modinv[i] = self.mod - self.mod//i * modinv[self.mod%i] % self.mod
        return modinv

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
# dfs のサンプル
def dfs(graph,parent,counter,edge):
    stk = []
    stk.append(edge)
    while len(stk) > 0:
        p = stk.pop()
        for e in graph[p]:
            if parent[p] == e:
                continue
            else:
                parent[e] = p
                counter[e] += counter[p]
                stk.append(e)

#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
#-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-
if __name__ == "__main__":
	main()

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import accumulate, permutations, combinations, product
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from fractions import gcd
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

A, B = MAP()
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
import decimal # 10進法に変換，正確な計算

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

def main():
    a, b = map(int, input().split())
    c = a - b*2
    if c < 0:
        print(0)
        return
    print(c)
            
    
    
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 = 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())
print(0 if A <= B*2 else 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())
if a - b * 2 >= 0:
    print(a - b * 2)
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:
#!/usr/bin/env python3
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())

ans = A - 2*B

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

Submission status: Accepted

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

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

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:
    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:
#ABC 143A
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 - 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())
print(max(0,a-b*2))

Submission status: Accepted

Solution code:
a,b = map(int, raw_input().split(' '))
print max(0, a - (b << 1))

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:
from collections import defaultdict, deque
import sys


def LI(): return list(map(int, sys.stdin.buffer.readline().split()))
def I(): return int(sys.stdin.buffer.readline())
def LS(): return sys.stdin.buffer.readline().rstrip().decode('utf-8').split()
def S(): return sys.stdin.buffer.readline().rstrip().decode('utf-8')
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)]


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

Submission status: Accepted

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

N = A - 2 * B

if N > 0:
    print(str(N))
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 = list(map(int,input().split()))

a = a-b-b

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

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python3
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines


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


if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
def curtain(a, b):

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

if __name__ == '__main__':
    main()

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

Submission status: Accepted

Solution code:
from sys import stdin, setrecursionlimit


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


if __name__ == "__main__":
    setrecursionlimit(10000)
    main()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
N = list(map(int,input().split(" ")))

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
def main():
    a, b = map(int, open(0).read().split())

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10**6)

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

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

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().rstrip().split())
b2 = b * 2
r = 0 if a <= b2 else a - b2
print(r)

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

Submission status: Accepted

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

ans = max(0, A-2*B)
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=[int(x) for x in input().split()]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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
# Your code here!

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

ans = a - min(a, 2 * b)
print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys, math
input = sys.stdin.readline
rs = lambda: input().strip()
ri = lambda: int(input())
rl = lambda: list(map(int, input().split()))
mod = 10**9 + 7

A, B = rl()

print(max(A-2*B,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:
import sys
def ISI(): return map(int, sys.stdin.readline().rstrip().split())
a, b = ISI()
if a<2*b:print(0)
else:print(a-2*b)

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:
# coding:utf-8

import sys
import math
import time
#import numpy as np
import collections
from collections import deque
from collections import Counter
import queue
import copy
import bisect
import heapq
import itertools



sys.setrecursionlimit(10**7)
#N, Q = map(int, input().split())
#G = [list(input()) for i in range(H)]
#INF = V * 10001
#A = [int(i) for i in input().split()]
#AB = [list(map(int, input().split())) for _ in range(K)]

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import itertools
import math
import fractions
import functools
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(0 if a-b*2 < 0 else a-b*2)

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()))
print(0 if a[0]-2*a[1]<=0 else a[0]-2*a[1])

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

Submission status: Accepted

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

Submission status: Accepted

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

a = x[0]
b = x[1]

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

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
import sys
import math
import bisect


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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import bisect,collections,copy,heapq,itertools,math,string
import sys
def S(): return sys.stdin.readline().rstrip()
def M(): return map(int,sys.stdin.readline().rstrip().split())
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())
A, B = M()
if A < 2*B:
    print(0)
else:
    print(A-2*B)

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

Submission status: Accepted

Solution code:
import fileinput

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

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

Submission status: Accepted

Solution code:
from sys import stdin

def main():
    A, B = [int(x) for x in stdin.readline().rstrip().split()]
    if A > 2*B:
        print(A - 2*B)
    else:
        print(0)
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:
from sys import stdin

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

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

Submission status: Accepted

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


if __name__ == '__main__':

    ABC_143_A()

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

a = A - B * 2

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

Submission status: Accepted

Solution code:
import sys

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

A,B = LI()

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

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

if __name__ == '__main__':
    main()

Submission status: Accepted

Solution code:
from collections import defaultdict, deque, Counter
from heapq import heappush, heappop
from itertools import permutations, accumulate, combinations, combinations_with_replacement
from math import sqrt, ceil, floor, factorial
from bisect import bisect_left, bisect_right
from copy import deepcopy
from operator import itemgetter
from functools import reduce
#from fractions import gcd
#from math import gcd
import sys
def I(): return int(input())
def Is(): return map(int, input().split())
def LI(): return list(map(int, input().split()))
def TI(): return tuple(map(int, input().split()))
def IR(n): return [I() for _ in range(n)]
def LIR(n): return [LI() for _ in range(n)]
def TIR(n): return [TI() for _ in range(n)]
def S(): return input()
def Ss(): return input().split()
def LS(): return list(input())
def SR(n): return [S() for _ in range(n)]
def SsR(n): return [Ss() for _ in range(n)]
def LSR(n): return [LS() for _ in range(n)]
sys.setrecursionlimit(10**6)
MOD = 10**9+7
INF = float('inf')


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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 6)
# input = sys.stdin.readline    ####
int1 = lambda x: int(x) - 1
def II(): return int(input())

def MI(): return map(int, input().split())
def MI1(): return map(int1, input().split())

def LI(): return list(map(int, input().split()))
def LI1(): return list(map(int1, input().split()))
def LLI(rows_number): return [LI() for _ in range(rows_number)]

def printlist(lst, k='\n'): return k.join(list(map(str, lst)))
INF = float('inf')

def solve():
    a, b = MI()

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


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

Submission status: Accepted

Solution code:
# A - Curtain

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

Submission status: Accepted

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

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

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

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

Submission status: Accepted

Solution code:
import sys
sys.setrecursionlimit(10 ** 5 + 10)
def input(): return sys.stdin.readline().strip()

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

Submission status: Accepted

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

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