a,b=[int(a)for a in input().split()]

c=b+b
if(a-c!=0)and(a-c>=0):
    print(a-c)
else:
    print(0)

#print(type(c)) int(a)for a in input().split() for a in input().split() a input().split() ().split () input split for a in input().split() int(a) int a a,b=[int(a)for a in input().split()] a [int(a)for a in input().split()] b c=b+b c b+b b b if(a-c!=0)and(a-c>=0):
    print(a-c)
else:
    print(0)

#print(type(c)) (a-c!=0)and(a-c>=0) a-c!=0 a-c a c 0 a-c>=0 a-c a c 0 print(a-c) print a-c a c print(0) print 0 b=[int(a)for a in input().split()] [int(a)for a in input().split()] b c=b+b b+b c a,b=[int(a)for a in input().split()] [int(a)for a in input().split()] a
a,b=[int(a)for a in input().split()]

c=b+b
if(a-c!=0)and(a-c>=0):
    print(a-c)
else:
    print(0)

#print(type(c))