import sys
input = sys.stdin.readline
from collections import *

A, B = map(int, input().split())
print(max(A-2*B, 0)) import sys sys input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline from collections import * A, B = map(int, input().split()) A map(int, input().split()) map int input().split() ().split () input split B print(max(A-2*B, 0)) print max(A-2*B, 0) max A-2*B A 2*B 2 B 0 A, B = map(int, input().split()) map(int, input().split()) A B = map(int, input().split()) map(int, input().split()) B input = sys.stdin.readline sys.stdin.readline input
import sys
input = sys.stdin.readline
from collections import *

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