def main():
    import sys
    readline = sys.stdin.buffer.readline

    a, b = map(int, readline().split())
    print(max(0, a-b-b))

if __name__ == '__main__':
    main() def main():
    import sys
    readline = sys.stdin.buffer.readline

    a, b = map(int, readline().split())
    print(max(0, a-b-b)) main import sys sys readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline a, b = map(int, readline().split()) a map(int, readline().split()) map int readline().split() ().split () readline split b print(max(0, a-b-b)) print max(0, a-b-b) max 0 a-b-b a-b a b b if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    import sys
    readline = sys.stdin.buffer.readline

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

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

    a, b = map(int, readline().split())
    print(max(0, a-b-b))

if __name__ == '__main__':
    main()