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