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