LIEN666 @ 2021-03-30 14:54:09
K = int(input())
sum_gold = 0
lst = []
for i in range(1, K + 1):
for index, value in enumerate(range(1, i + 1)):
if (index + 1) <= K:
sum_gold = i
lst.append(sum_gold)
for index, value in enumerate(lst[:K]):
if (index + 1) == K:
sum_gold = sum(lst[:index + 1])
print(sum_gold)