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: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

if A<B*2:
    print(0)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

if ans <= 0:
    ans = 0

print(ans)

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

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

Submission status: Wrong Answer

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

r = A - (2*B)

if A < B :
  r = 0
  
print(r)

Submission status: Wrong Answer

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

r = A - (2*B)

if A < B :
  r = 0

Submission status: Wrong Answer

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

print(A-B*2)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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


ans = a-2*b
print(ans)

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

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

Submission status: Wrong Answer

Solution code:
#!usr/bin/env python3
from collections import defaultdict,deque
from heapq import heappush, heappop
import sys
import math
import bisect
import random
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def I(): return int(sys.stdin.readline())
def LS():return [list(x) for x in sys.stdin.readline().split()]
def S():
    res = list(sys.stdin.readline())
    if res[-1] == "\n":
        return res[:-1]
    return res
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)]

sys.setrecursionlimit(1000000)
mod = 1000000007

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

#Solve
if __name__ == "__main__":
    solve()

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

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

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

Submission status: Accepted

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

C = B * 2

if C >= A:
    print(0)
else:
    print(A - C)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
import sys
stdin=sys.stdin

ip=lambda: int(sp())

lp=lambda:list(map(int,stdin.readline().split()))
sp=lambda:stdin.readline().rstrip()

a,b=lp()

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int,input().split())
L = int(A-2*B)
if L>0:
    print(L)
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())
# 家の横方向の長さA, 横方向の長さBのカーテンが2枚
print(max(A - 2 * B, 0))

Submission status: Accepted

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

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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 = [int(n) for n in input().split()]

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

Submission status: Accepted

Solution code:
#143

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
A, B = map(int, input().split())
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(0)
else:
    print(ANS)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
house_len, curtain_len = map(int, input().split())

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
def main():
    import sys
    readline = sys.stdin.buffer.readline

    a, b = map(int, readline().split())
    print(max(0, a-b-b))

if __name__ == '__main__':
    main()

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())
print(max(0,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:
#!/usr/bin/env python3
# Generated by https://github.com/kyuridenamida/atcoder-tools
from typing import *
import collections
import functools as fts
import itertools as its
import math
import sys

INF = float('inf')


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


def main():

    sys.setrecursionlimit(10 ** 6)

    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
    print(f'{solve(A, B)}')


if __name__ == '__main__':
    main()

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
li = [int(x) for x in input().split()]
if 2*li[1]>=li[0]:
  print('0')
else:
  print(li[0]-2*li[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:
# 問題：https://atcoder.jp/contests/abc143/tasks/abc143_a

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

Submission status: Accepted

Solution code:
a,b=map(int,input().split(' '))
#count=0

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

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

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

Submission status: Accepted

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

b = b * 2

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

Submission status: Accepted

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

#残りのカーテンの長さxを計算する
x = A-2*B

#隠されていないカーテンの長さが-はありえない
if x < 0:
    print(0)
else:
    print(x)

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

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

Submission status: Accepted

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

Submission status: Accepted

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

def mi(): return map(int,input().split())
def ii(): return int(input())
def isp(): return input().split()
def deb(text): print("-------\n{}\n-------".format(text))

INF=10**20
def main():
    A,B=mi()
    print(max(0,A-2*B))




if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
from sys import stdin
import sys
import math
from functools import reduce
import functools
import itertools
from collections import deque,Counter,defaultdict
from operator import mul
import copy
# ! /usr/bin/env python
# -*- coding: utf-8 -*-
import heapq
sys.setrecursionlimit(10**6)
# INF =  float("inf")
INF = 10**18
import bisect
import statistics
mod = 10**9+7
# mod = 998244353

N, M = map(int, input().split())

print(max(0, N-2*M))

Submission status: Accepted

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

Submission status: Accepted

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

else:
    print(A - 2*B)

Submission status: Accepted

Solution code:
import sys, bisect, math, itertools, string, queue, copy
# import numpy as np
# import scipy
# from collections import Counter,defaultdict,deque
# from itertools import permutations, combinations
# from heapq import heappop, heappush
# # input = sys.stdin.readline
# sys.setrecursionlimit(10**8)
# mod = 10**9+7
def inp(): return int(input())
def inpm(): return map(int,input().split())
def inpl(): return list(map(int, input().split()))
def inpls(): return list(input().split())
def inplm(n): return list(int(input()) for _ in range(n))
def inplL(n): return [list(input()) for _ in range(n)]
def inplT(n): return [tuple(input()) for _ in range(n)]
def inpll(n): return [list(map(int, input().split())) for _ in range(n)]
def inplls(n): return sorted([list(map(int, input().split())) for _ in range(n)])

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

Solution code:
import sys


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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

Submission status: Accepted

Solution code:

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


if __name__ == "__main__":
    main()

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
A, B = list(map(int, input().split()))
ans = max(0, 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 print(0)

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

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

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

ans = a - b*2

print(ans if ans > 0 else 0)

Submission status: Accepted

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

Submission status: Accepted

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

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

Submission status: Accepted

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

ans = A - B*2

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

Submission status: Accepted

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

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

Submission status: Accepted

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

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

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

Submission status: Accepted

Solution code:
#https://atcoder.jp/contests/abc143/tasks/abc143_a
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())
ans = a - b*2
print(ans if ans > 0 else 0)

Submission status: Accepted

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

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

Submission status: Accepted

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

X=A-2*B

if X>=1:
    print(X)
    
else:
    print("0")

Submission status: Accepted

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
n = [int(i) for i in input().split()]
print(max(n[0] - 2*n[1], 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-2*B,0 ))

Submission status: Accepted

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

Submission status: Accepted

Solution code:
a, b = map(int, input().split())  
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:
#k = int(input())
#s = input()
#a, b = map(int, input().split())
#s, t = map(str, input().split())
#l = list(map(int, input().split()))

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

Submission status: Accepted

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

Submission status: Accepted

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

def main():

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

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

    print(ans)


if __name__ == "__main__":
    main()

Submission status: Accepted

Solution code:
tmp = input().split(" ")
A = int(tmp[0])
B = int(tmp[1])

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

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:


def read_int():
    return int(input().strip())


def read_ints():
    return list(map(int, input().strip().split(' ')))


def solve():
    A, B = read_ints()
    if 2*B >= A:
        return 0
    return A-2*B


if __name__ == '__main__':
    print(solve())

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

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

Submission status: Accepted

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

Submission status: Accepted

Solution code:
from sys import stdin,stdout
def INPUT():return list(int(i) for i in stdin.readline().split())
import math
def inp():return stdin.readline()
def out(x):return stdout.write(x)
import math as M
MOD=10**9+7
import sys
#####################################
a,b=INPUT()
if a>=2*b:
    print(a-2*b)
else:
    print(0)