house_len, curtain_len = map(int, input().split())

if house_len >= curtain_len * 2:
    print(house_len - curtain_len * 2)
else:
    print(0) house_len, curtain_len = map(int, input().split()) house_len map(int, input().split()) map int input().split() ().split () input split curtain_len if house_len >= curtain_len * 2:
    print(house_len - curtain_len * 2)
else:
    print(0) house_len >= curtain_len * 2 house_len curtain_len * 2 curtain_len 2 print(house_len - curtain_len * 2) print house_len - curtain_len * 2 house_len curtain_len * 2 curtain_len 2 print(0) print 0 curtain_len = map(int, input().split()) map(int, input().split()) curtain_len house_len, curtain_len = map(int, input().split()) map(int, input().split()) house_len
house_len, curtain_len = map(int, input().split())

if house_len >= curtain_len * 2:
    print(house_len - curtain_len * 2)
else:
    print(0)