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