def main():

    A, B = (int(i) for i in input().split())

    print((max(0, A - 2*B)))





if __name__ == '__main__':

    main()

def main():

    a, b = (int(i) for i in input().split())

    print((max(a - 2*b, 0)))





if __name__ == '__main__':

    main()

def main():
    A, B = (int(i) for i in input().split())
    print((max(0, A - 2 * B)))


if __name__ == "__main__":
    main()

def main():
    a, b = (int(i) for i in input().split())
    print((max(a - 2 * b, 0)))


if __name__ == "__main__":
    main()

-    A, B = (int(i) for i in input().split()) -    print((max(0, A - 2 * B))) +    a, b = (int(i) for i in input().split()) +    print((max(a - 2 * b, 0)))