7. Write a program that reads an integer N from the keyboard computes and displays the sum of the numbers from N to (2 * N) if N is nonnegative. If N is a negative number, then it’s the sum of the numbers from (2 * N) to N. The starting and ending points are included in the sum.

# Code
n = int(input())
x = 0
if n > 0:
for i in range(n, 2*n+1):
x += i
else:
for i in range(2*n, n+1): # for negative n, we need to reverse start & end of range
x += i
print(x)