import sys


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


if __name__ == "__main__":
    main() import sys sys def main():
    input = sys.stdin.buffer.readline
    a, b = map(int, input().split())
    print(max(0, a - 2 * b)) main input = sys.stdin.buffer.readline input sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline 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():
    input = sys.stdin.buffer.readline
    a, b = map(int, input().split())
    print(max(0, a - 2 * b)) def main():
    input = sys.stdin.buffer.readline
    a, b = map(int, input().split())
    print(max(0, a - 2 * b)) main
import sys


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


if __name__ == "__main__":
    main()
