a, b = map(int, input().split())
c = a - 2 * b
if c < 0:
    print('0')
else:
    print(c) a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b c = a - 2 * b c a - 2 * b a 2 * b 2 b if c < 0:
    print('0')
else:
    print(c) c < 0 c 0 print('0') print '0' print(c) print c c = a - 2 * b a - 2 * b c b = map(int, input().split()) map(int, input().split()) b a, b = map(int, input().split()) map(int, input().split()) a
a, b = map(int, input().split())
c = a - 2 * b
if c < 0:
    print('0')
else:
    print(c)