A, B = list(map(int, input().split()))
ans = max(0, A - B * 2)
print(ans) A, B = list(map(int, input().split())) A list(map(int, input().split())) list map(int, input().split()) map int input().split() ().split () input split B ans = max(0, A - B * 2) ans max(0, A - B * 2) max 0 A - B * 2 A B * 2 B 2 print(ans) print ans A, B = list(map(int, input().split())) list(map(int, input().split())) A ans = max(0, A - B * 2) max(0, A - B * 2) ans B = list(map(int, input().split())) list(map(int, input().split())) B
A, B = list(map(int, input().split()))
ans = max(0, A - B * 2)
print(ans)
