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


if __name__ == "__main__":
    main() def main():
    a, b = map(int, input().split())
    print(max(0, a-2*b)) main a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b print(max(0, a-2*b)) print max(0, a-2*b) max 0 a-2*b a 2*b 2 b if __name__ == "__main__":
    main() __name__ == "__main__" __name__ "__main__" main() main def main():
    a, b = map(int, input().split())
    print(max(0, a-2*b)) def main():
    a, b = map(int, input().split())
    print(max(0, a-2*b)) main
def main():
    a, b = map(int, input().split())
    print(max(0, a-2*b))


if __name__ == "__main__":
    main()
