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