# n == 4
n = int(input())
i = 0
a = 2
while i<=n:
a = a + i*2
i+=1
else:
a-=2
print(a)
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
# n == 4
n = int(input())
i = 0
a = 2
while i<=n:
a = a + i*2
i+=1
else:
a-=2
print(a)