Problem EK: 1+2+4+7+ ……+n(n<=K)

Problem EK: 1+2+4+7+ ……+n(n<=K)

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

SubmitProblemList

Description

读入整数k
S=1+2+4+7+11+…+n,
其中n是满足规律且不大于k的最大整数。
求s的值。

Input

一个整数k 

Output

总和s

Sample Input Copy

10

Sample Output Copy

14

HINT

1+2+4+7=14 
数据规模 1<= k <=1000000