Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break

    count = 0
    for a int range(1, n + 1 - 2):
        for b in range(a + 1, n + 1 - 1 ):
            for c in range(b + 1, n + 1):
                if (a + b + c) == x:
                    count += 1
    print(count)

Fixed submission:
while True:
    (n, x) =  [int(i) for i in input().split()]
    if n == x == 0:
        break
 
    count = 0
    for a in range(1, n+1):
        for b in range(a+1, n+1):
            for c in range(b+1, n+1):
                if (a + b + c) == x:
                    count += 1
                elif (a + b + c) > x:
                    break
    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break

    count = 0
    for a int range(1, n + 1 - 2):
        for b in range(a + 1, n + 1 - 1 ):
            for c in range(b + 1, n + 1):
                if (a + b + c) == x:
                    count += 1
    print(count)

Fixed submission:
while True:
    (n, x) =  [int(i) for i in input().split()]
    if n == x == 0:
        break
 
    count = 0
    for a in range(1, n+1):
        for b in range(a+1, n+1):
            for c in range(b+1, n+1):
                if (a + b + c) == x:
                    count += 1
                elif (a + b + c) > x:
                    break
    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break

    count = 0
    for a int range(1, n + 1 - 2):
        for b in range(a + 1, n + 1 - 1 ):
            for c in range(b + 1, n + 1):
                if (a + b + c) == x:
                    count += 1
    print(count)

Fixed submission:
while True:
    (n, x) =  [int(i) for i in input().split()]
    if n == x == 0:
        break
 
    count = 0
    for a in range(1, n+1):
        for b in range(a+1, n+1):
            for c in range(b+1, n+1):
                if (a + b + c) == x:
                    count += 1
                elif (a + b + c) > x:
                    break
    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break

    count = 0
    for a int range(1, n + 1 - 2):
        for b in range(a + 1, n + 1 - 1 ):
            for c in range(b + 1, n + 1):
                if (a + b + c) == x:
                    count += 1
    print(count)

Fixed submission:
while True:
    (n, x) =  [int(i) for i in input().split()]
    if n == x == 0:
        break
 
    count = 0
    for a in range(1, n+1):
        for b in range(a+1, n+1):
            for c in range(b+1, n+1):
                if (a + b + c) == x:
                    count += 1
                elif (a + b + c) > x:
                    break
    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break

    count = 0
    for a int range(1, n + 1 - 2):
        for b in range(a + 1, n + 1 - 1 ):
            for c in range(b + 1, n + 1):
                if (a + b + c) == x:
                    count += 1
    print(count)

Fixed submission:
while True:
    (n, x) =  [int(i) for i in input().split()]
    if n == x == 0:
        break
 
    count = 0
    for a in range(1, n+1):
        for b in range(a+1, n+1):
            for c in range(b+1, n+1):
                if (a + b + c) == x:
                    count += 1
                elif (a + b + c) > x:
                    break
    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break

    count = 0
    for a int range(1, n + 1 - 2):
        for b in range(a + 1, n + 1 - 1 ):
            for c in range(b + 1, n + 1):
                if (a + b + c) == x:
                    count += 1
    print(count)

Fixed submission:
while True:
    (n, x) =  [int(i) for i in input().split()]
    if n == x == 0:
        break
 
    count = 0
    for a in range(1, n+1):
        for b in range(a+1, n+1):
            for c in range(b+1, n+1):
                if (a + b + c) == x:
                    count += 1
                elif (a + b + c) > x:
                    break
    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break

    count = 0 
    for a int range(1, n + 1 - 2): 
        for b in range(a + 1, n + 1 - 1 ):
            for c in range(b + 1, n + 1): 
                if (a + b + c) == x:
                    count += 1
    print(count)

Fixed submission:
while True:
    (n, x) =  [int(i) for i in input().split()]
    if n == x == 0:
        break
 
    count = 0
    for a in range(1, n+1):
        for b in range(a+1, n+1):
            for c in range(b+1, n+1):
                if (a + b + c) == x:
                    count += 1
                elif (a + b + c) > x:
                    break
    print(count)

Buggy python submission (verdict: Runtime Error):
while True:
    (n, x) = [int(i) for i in input().split()]
    if n == x == 0:
        break

    count = 0 
    for a int range(1, n + 1 - 2): 
        for b in range(a + 1, n + 1 - 1 ):
            for c in range(b + 1, n + 1): 
                if (a + b + c) == x:
                    count += 1
    print(count)

Fixed submission:
while True:
    (n, x) =  [int(i) for i in input().split()]
    if n == x == 0:
        break
 
    count = 0
    for a in range(1, n+1):
        for b in range(a+1, n+1):
            for c in range(b+1, n+1):
                if (a + b + c) == x:
                    count += 1
                elif (a + b + c) > x:
                    break
    print(count)