# A Curtain
a, b = map(int, input().split())
x = a-(b * 2)
if x > 0:
    print(x)
else:
    print(0) a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b x = a-(b * 2) x a-(b * 2) a b * 2 b 2 if x > 0:
    print(x)
else:
    print(0) x > 0 x 0 print(x) print x print(0) print 0 a, b = map(int, input().split()) map(int, input().split()) a x = a-(b * 2) a-(b * 2) x b = map(int, input().split()) map(int, input().split()) b
# A Curtain
a, b = map(int, input().split())
x = a-(b * 2)
if x > 0:
    print(x)
else:
    print(0)
