import sys
input = sys.stdin.readline
A,B =list(map(int,input().split()))
print(max(0,A-2*B))  import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline 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 print(max(0,A-2*B)) print max(0,A-2*B) max 0 A-2*B A 2*B 2 B B =list(map(int,input().split())) list(map(int,input().split())) B input = sys.stdin.readline sys.stdin.readline input A,B =list(map(int,input().split())) list(map(int,input().split())) A
import sys
input = sys.stdin.readline
A,B =list(map(int,input().split()))
print(max(0,A-2*B)) 
