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

r = a - 2 * b

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

Submission status: Accepted

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

b*=2

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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


if __name__ == "__main__":
    test()

Submission status: Accepted

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

a = int(a)

b = int(b)

answer = a - 2*b

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

Submission status: Accepted

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

solve()

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
"""
Created on Sat Apr 20 20:47:47 2019

@author: Owner
"""

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

#素因数を並べる
def prime_decomposition(n):
  i = 2
  table = []
  while i * i <= n:
    while n % i == 0:
      n /= i
      table.append(int(i))
    i += 1
  if n > 1:
    table.append(int(n))
  return table   
# 桁数を吐く
def digit(i):
    if i > 0:
        return digit(i//10) + [i%10]
    else:
        return []
    
def getNearestValueIndex(list, num):
    """
    概要: リストからある値に最も近い値のインデックスを取得する関数
    @param list: データ配列
    @param num: 対象値
    @return 対象値に最も近い値
    """

    # リスト要素と対象値の差分を計算し最小値のインデックスを取得
    idx = np.abs(np.asarray(list) - num).argmin()
    return idx

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

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

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

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

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

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



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

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

    
if __name__ == '__main__':
    main()



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

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

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


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

# 複数配列を並び替え
ABT = zip(A, B, totAB)
# itemgetterには何番目の配列をキーにしたいか渡します
A, B, totAB = zip(*ABT)

# 2進数のbit判定
(x >> i) & 1

# dp最小化問題
dp = [np.inf]*N
for n in range(N):
    if n == 0:
        dp[n] = 0
    else:
        for k in range(1,K+1):
            if n-k >= 0:
                dp[n] = min(dp[n], dp[n-k] + abs(h[n]-h[n-k]))
            else:
                break
# 累積和
add = 1 # 問題によって決まる
res = 0
sums = [0]*(len(nums)+1)
for i in range(len(nums)):
    sums[i+1] = sums[i] + nums[i]
for i in range(0, len(nums), 2):
    left = i
    right = min(i+add, len(nums))
    tmp = sums[right] - sums[left]
    res = max(tmp, res)

#２分探索
li, ri = bisect.bisect_left(p_ac, l[i]-1), bisect.bisect_right(p_ac, r[i]-1)    

#ソート関数
org_list = [3, 1, 4, 5, 2]
new_list = sorted(org_list)
print(org_list)
print(new_list)
# [3, 1, 4, 5, 2]
# [1, 2, 3, 4, 5]

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

"""

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

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:
from sys import stdin
from itertools import accumulate, dropwhile, takewhile, groupby
import copy

# 入力 =stdin.readline().rstrip()
# 分割 = stdin.readline().rstrip().split()

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

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

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

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

print(list(set(a) | set(b)))  # 和集合
print(list(set(a) & set(b)))  # 積集合
'''

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

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

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

Submission status: Accepted

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

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

Ans = A - 2 * B

if Ans <= 0:
  Ans = 0

print(Ans)

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

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

Submission status: Accepted

Solution code:
#gcdは3.4.3だとfractionsにある
from fractions import gcd

from math import factorial as f

from math import ceil,floor,sqrt

from sys import exit

from copy import deepcopy
import numpy as np

import bisect
import re


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



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

main()

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:
# -*- coding: utf-8 -*-
A,B = map(int,input().split())

a = A - 2 * B

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

Submission status: Accepted

Solution code:
[A, B] = [int(i) for i in 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())			# "5 7" -> ["5", "7"] -> 5, 7 => N=5,K=7

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

Submission status: Accepted

Solution code:
import sys,queue,copy
sys.setrecursionlimit(10**8)
def inpl(): return list(map(int, sys.stdin.readline().split()))
def inpl_str(): return list(sys.stdin.readline().split())
INF = float('inf')

A,B = inpl()

ans =A-2*B

if ans <0:
    ans =0

print(ans)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin

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

tmp = A - 2 * B

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

Submission status: Accepted

Solution code:
A,B = map(int,input().split())
#X_list = list(map(int,input().split()))
#X1_list = [int(input()) for i in range(N)]
#X2_list = [list(map(int,input().split())) for i in range(N)]
if A - (2 * B ) >=0 :
    print(A - (2 * B ))
else:
    print(0)

Submission status: Accepted

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

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

Submission status: Accepted

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

    ans = a - b*2

    ans = 0 if ans <=0 else ans

    print(ans)
    
resolve()

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-2*b))

Submission status: Accepted

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


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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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


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

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

Submission status: Accepted

Solution code:
A,B=[int(thing) for thing in 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())
answer = max(a - b * 2, 0)
print(answer)

Submission status: Accepted

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

result = None

result = a - b * 2

if result < 0:
    result = 0

print(result)

Submission status: Accepted

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

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

if A <= B*2:
    print("0")
else:
    print(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:
#!/usr/bin/env python3
import sys


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

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

Submission status: Accepted

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

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

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


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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
from __future__ import division, print_function

import os
import sys
from io import BytesIO, IOBase

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


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

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


# region fastio

BUFSIZE = 8192


class FastIO(IOBase):
    newlines = 0

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

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

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

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


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


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


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

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

# endregion

if __name__ == "__main__":
    main()

Submission status: Accepted

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

c = a - (b * 2)

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

left = A - (B*2)

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:

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

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

Submission status: Accepted

Solution code:

from sys import stdin

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

ans = A-B*2

if ans < 0:
    ans = 0

print(ans)

Submission status: Accepted

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

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

Submission status: Accepted

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


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


if __name__ == '__main__':
  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())

ans = A - B * 2

if ans <= 0:
    ans = 0

print(ans)

Submission status: Accepted

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

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

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

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

print(result)

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline

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

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

print(ans)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

a, b = list(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-2*b))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys

input = sys.stdin.readline


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


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
# Atcoder 2019/10/19

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

ans = A - 2 * B

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

Submission status: Accepted

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


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


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

    ans = solve(A, B)

    print(ans)

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

x = A - (2 * B)

if x >= 0:
	print(x)
elif x < 0:
	print(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:
data = input().split(" ")
a = int(data[0])
b = int(data[1])
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<=2*B):
    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())
print(max(0, A-B-B))

Submission status: Accepted

Solution code:
a,b = map(int,input().split())
#li = list(map(imt,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 else 0)

Submission status: Accepted

Solution code:
from sys import stdin


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

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


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

ans = A - B*2

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

Submission status: Accepted

Solution code:
window, curtain = map(int, input().split())
if(window-2*curtain > 0):
    print(window-2*curtain)
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())
if A > 2*B:
    print(A - 2*B)
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:
A,B = [int(x) for x in input().split()]

count = A - 2 * B

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

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

Submission status: Accepted

Solution code:
if __name__ == '__main__':
    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(_) for _ in input().split()]
if a <= 2*b:
    ans = 0
else:
    ans = a - 2*b
print(ans)

Submission status: Accepted

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

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(x) for x in input().split()]

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

print(ret)

Submission status: Accepted

Solution code:
import sys
from fractions import gcd
from functools import reduce
from itertools import combinations
from random import random

import numpy as np

sys.setrecursionlimit(200000)


class Solver:
    def __init__(self):
        pass

    def input(self):
        """
            faster input function than builtin stdin.
        """
        return sys.stdin.readline()[:-1]

    def ii(self, t: type = int):
        """
            input single value.
        """
        return t(self.input())

    def il(self, t: type = int):
        """
            input single line.
        """
        return list(map(t, self.input().split()))

    def imi(self, N: int, t: type = int):
        return [self.ii(t) for _ in range(N)]

    def iml(self, N: int, t: type = int):
        return [self.il(t) for _ in range(N)]

    def solve(self):
        a, b = self.il()
        return a - 2 * b if a > 2 * b else 0


if __name__ == "__main__":
    solver = Solver()
    print(solver.solve())

Submission status: Accepted

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

Submission status: Accepted

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

n = a - b * 2

if (n < 0):
    n = 0

print(n)

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
A,B = [int(n) for n in 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(a-2*b,0))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
#!/usr/bin/env python
# coding: utf-8

def ri():
    return int(input())

def rl():
    return list(input().split())

def rli():
    return list(map(int, input().split()))

def main():
    a, b = rli()
    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)>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 = map(int, input().strip().split())

ret = A - 2 * B

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

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

Submission status: Accepted

Solution code:
# -*- coding: utf-8 -*-
A,B = 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())
c=a-b*2
if c<0:
  print("0")
else:
  print(c)

Submission status: Accepted

Solution code:

import sys
#input = sys.stdin.readline
def solve():
  a,b = (int(i) for i in input().split())
  print(max(0,a-2*b))
solve()

Submission status: Accepted

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

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