#!/usr/bin/env python3
a,b=map(int,input().split())
print((a-b*2)*(a>b*2)or 0) a,b=map(int,input().split()) a map(int,input().split()) map int input().split() ().split () input split b print((a-b*2)*(a>b*2)or 0) print (a-b*2)*(a>b*2)or 0 (a-b*2)*(a>b*2) a-b*2 a b*2 b 2 a>b*2 a b*2 b 2 0 a,b=map(int,input().split()) map(int,input().split()) a b=map(int,input().split()) map(int,input().split()) b
#!/usr/bin/env python3
a,b=map(int,input().split())
print((a-b*2)*(a>b*2)or 0)
