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


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

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


if __name__ == "__main__":
    main()
