def main():
    A, B = map(int, input().split())

    if A - 2 * B > 0:
        ans = A - 2 * B
    else:
        ans = 0

    print(ans)


if __name__ == "__main__":
    main() def main():
    A, B = map(int, input().split())

    if A - 2 * B > 0:
        ans = A - 2 * B
    else:
        ans = 0

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

     A - 2 * B > 0 A - 2 * B A 2 * B 2 B 0 ans = A - 2 * B ans A - 2 * B A 2 * B 2 B ans = 0 ans 0 print(ans) print ans if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    A, B = map(int, input().split())

    if A - 2 * B > 0:
        ans = A - 2 * B
    else:
        ans = 0

    print(ans) def main():
    A, B = map(int, input().split())

    if A - 2 * B > 0:
        ans = A - 2 * B
    else:
        ans = 0

    print(ans) main
def main():
    A, B = map(int, input().split())

    if A - 2 * B > 0:
        ans = A - 2 * B
    else:
        ans = 0

    print(ans)


if __name__ == "__main__":
    main()
