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

if not ( 1 <= A <= 100 and 1 <= B <= 100 ): sys.exit()
if not ( isinstance(A,int) and isinstance(B,int) ): sys.exit()

print( A - (B * 2)) if A - (B * 2) >= 0 else print(0)
 import sys sys A,B = map(int,input().split()) A map(int,input().split()) map int input().split() ().split () input split B if not ( 1 <= A <= 100 and 1 <= B <= 100 ): sys.exit() not ( 1 <= A <= 100 and 1 <= B <= 100 ) 1 <= A <= 100 and 1 <= B <= 100 1 <= A <= 100 1 <= A 1 A 100 1 <= B <= 100 1 <= B 1 B 100 if not ( isinstance(A,int) and isinstance(B,int) ): sys.exit() not ( isinstance(A,int) and isinstance(B,int) ) isinstance(A,int) and isinstance(B,int) isinstance(A,int) isinstance A int isinstance(B,int) isinstance B int print( A - (B * 2)) if A - (B * 2) >= 0 else print(0) A - (B * 2) >= 0 A - (B * 2) A B * 2 B 2 0 print( A - (B * 2)) print A - (B * 2) A B * 2 B 2 print(0) print 0 A,B = map(int,input().split()) map(int,input().split()) A B = map(int,input().split()) map(int,input().split()) B
import sys
A,B = map(int,input().split())

if not ( 1 <= A <= 100 and 1 <= B <= 100 ): sys.exit()
if not ( isinstance(A,int) and isinstance(B,int) ): sys.exit()

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

