a=int(input())
if a>=1 and a<=10000:
    coins=0
    days=0
    daystrue=0
    tof=1
    while daystrue<=a:
        days+=1
        for i in range(days):
            if daystrue<a:
                coins+=days
                daystrue+=1
            else:
                tof=0
                break
        if tof==0:
            break
    print(coins)
/**************************************************************
	Problem: 1520
	User: admin
	Language: Python
	Result: Accepted
	Time:664 ms
	Memory:34480 kb
****************************************************************/