a,b = map(int, input().split())

left = a - (b*2)
print(left) if left >= 0 else print('0') a,b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b left = a - (b*2) left a - (b*2) a b*2 b 2 print(left) if left >= 0 else print('0') left >= 0 left 0 print(left) print left print('0') print '0' a,b = map(int, input().split()) map(int, input().split()) a b = map(int, input().split()) map(int, input().split()) b left = a - (b*2) a - (b*2) left
a,b = map(int, input().split())

left = a - (b*2)
print(left) if left >= 0 else print('0')