a,b = map(int, raw_input().split(' '))
print max(0, a - (b << 1)) a,b = map(int, raw_input().split(' ')) a map(int, raw_input().split(' ')) map int raw_input().split(' ') ().split () raw_input split ' ' b print max(0, a - (b << 1)) max 0 a - (b << 1) a b << 1 b 1 a,b = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) a b = map(int, raw_input().split(' ')) map(int, raw_input().split(' ')) b
a,b = map(int, raw_input().split(' '))
print max(0, a - (b << 1))