base = input().split()
a = int(base[0])
b = int(base[1])
if a>b*2:
    print(a-b*2)
else:
    print(0) base = input().split() base input().split() ().split () input split a = int(base[0]) a int(base[0]) int base[0] base 0 b = int(base[1]) b int(base[1]) int base[1] base 1 if a>b*2:
    print(a-b*2)
else:
    print(0) a>b*2 a b*2 b 2 print(a-b*2) print a-b*2 a b*2 b 2 print(0) print 0 a = int(base[0]) int(base[0]) a b = int(base[1]) int(base[1]) b base = input().split() input().split() base
base = input().split()
a = int(base[0])
b = int(base[1])
if a>b*2:
    print(a-b*2)
else:
    print(0)