Buggy python submission (verdict: Runtime Error):
i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
i = 0
 
for i in range(n):
  x = l + i
  alist.append(x)
  
   
j = 0
m = 0
for j in range(n-1):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
print(sum(alist) - alist[m])
 

Fixed submission:
i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
j = 0
 
for j in range(n):
  x = l + j
  alist.append(x)
  
   
k = 0
m = 0
for k in range(n-1):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
print(sum(alist) - alist[m])

Buggy python submission (verdict: Runtime Error):
i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
i = 1
 
for i in range(n):
  x = l + i - 1
  alist.append(x)
  
   
j = 0
m = 0
for j in range(n):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
print(sum(alist) - alist[m])
 

Fixed submission:
i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
j = 0
 
for j in range(n):
  x = l + j
  alist.append(x)
  
   
k = 0
m = 0
for k in range(n-1):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
print(sum(alist) - alist[m])

Buggy python submission (verdict: Runtime Error):


i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
i = 1
 
for i in range(n):
  x = l + i - 1
  alist.append(x)
  
  
  
 
k = 0
m = 0
for k in range(n):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
  
  
print(sum(alist) - alist[m])
 

Fixed submission:
i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
j = 0
 
for j in range(n):
  x = l + j
  alist.append(x)
  
   
k = 0
m = 0
for k in range(n-1):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
print(sum(alist) - alist[m])

Buggy python submission (verdict: Runtime Error):
import sys
input = sys.stdin.readline

i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
i = 1
 
for i in range(n):
  x = l + i - 1
  alist.append(x)
  
  
  
 
k = 0
m = 0
for k in range(n):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
  
  
print(sum(alist) - alist[m])
 

Fixed submission:
i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
j = 0
 
for j in range(n):
  x = l + j
  alist.append(x)
  
   
k = 0
m = 0
for k in range(n-1):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
print(sum(alist) - alist[m])

Buggy python submission (verdict: Time Limit Exceeded):
i = list(map(int,input().split()))
n = i[0]
l = i[1]

alist = []
i = 1

while i < n+1:
  x = l + i - 1
  alist.append(x)
  i =+ 1
  
  

k = 0
m = 0
while k < n-1:
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  k =+ 1
  
  
print(sum(alist) - alist[m])



  
  
  

Fixed submission:
i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
j = 0
 
for j in range(n):
  x = l + j
  alist.append(x)
  
   
k = 0
m = 0
for k in range(n-1):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
print(sum(alist) - alist[m])

Buggy python submission (verdict: Time Limit Exceeded):
i = list(map(int,input().split()))
n = i[0]
l = i[1]

alist = []
i = 1

while i < n+1:
  x = l + i - 1
  alist.append(x)
  i =+ 1
  
  

k = 0
m = 0
while k < n-1:
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  k =+ 1
  
  
print(sum(alist) - alist[m])



  
  
  

Fixed submission:
i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
j = 0
 
for j in range(n):
  x = l + j
  alist.append(x)
  
   
k = 0
m = 0
for k in range(n-1):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
print(sum(alist) - alist[m])

Buggy python submission (verdict: Time Limit Exceeded):
i = list(map(int,input().split()))
n = i[0]
l = i[1]

alist = []
i = 1

while i <= n:
  x = l + i - 1
  alist.append(x)
  i =+ 1
  
  
j = 0
abslist = []
while j < n:
  abslist[j] = abs(alist[j])
  j =+ 1

  

k = 0
m = 0
while k < n-1:
  if abslist[k] >= abslist[k+1]:
    m = k+1
  
  k =+ 1
  
  
print(sum(alist) - alist[m])



  
  
  

Fixed submission:
i = list(map(int,input().split()))
n = i[0]
l = i[1]
 
alist = []
j = 0
 
for j in range(n):
  x = l + j
  alist.append(x)
  
   
k = 0
m = 0
for k in range(n-1):
  if abs(alist[k]) >= abs(alist[k+1]):
    m = k+1
  
  
print(sum(alist) - alist[m])