import itertools
import math
import fractions
import functools
a, b = map(int, input().split())
if a <= 2*b:
    print(0)
else: print(a-2*b) import itertools itertools import math math import fractions fractions import functools functools a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b if a <= 2*b:
    print(0)
else: print(a-2*b) a <= 2*b a 2*b 2 b print(0) print 0 a, b = map(int, input().split()) map(int, input().split()) a b = map(int, input().split()) map(int, input().split()) b
import itertools
import math
import fractions
import functools
a, b = map(int, input().split())
if a <= 2*b:
    print(0)
else: print(a-2*b)