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