#!/usr/bin/env python3

def main():
    A, B = map(int, open(0).read().split())
    if (A >= B * 2):
        print(A - 2 * B)
    else:
        print(0)


main() def main():
    A, B = map(int, open(0).read().split())
    if (A >= B * 2):
        print(A - 2 * B)
    else:
        print(0) main A, B = map(int, open(0).read().split()) A map(int, open(0).read().split()) map int open(0).read().split() (0).read().split (0).read() (0).read (0) open 0 read split B if (A >= B * 2):
        print(A - 2 * B)
    else:
        print(0) A >= B * 2 A B * 2 B 2 print(A - 2 * B) print A - 2 * B A 2 * B 2 B print(0) print 0 main() main def main():
    A, B = map(int, open(0).read().split())
    if (A >= B * 2):
        print(A - 2 * B)
    else:
        print(0) def main():
    A, B = map(int, open(0).read().split())
    if (A >= B * 2):
        print(A - 2 * B)
    else:
        print(0) main
#!/usr/bin/env python3

def main():
    A, B = map(int, open(0).read().split())
    if (A >= B * 2):
        print(A - 2 * B)
    else:
        print(0)


main()