#include <stdio.h>

int main()
{
    int k;
    scanf("%d", &k);
    int jin = 0;
    for (int n = 1; n <=k ; n++)
    {
        int he = 0;
        int i;
        for (i = 1; ; i++)
        {
            he += i;
            if (he >= n)
            {
                break;
            }
        }//判断第n天该发多少金币
        jin += i;     
    }
    printf("%d", jin);
    return 0;
}