Problem1071--幸运数字

1071: 幸运数字

Time Limit: 1 Sec  Memory Limit: 128 MB
Submit: 61  Solved: 26
[Status] [Submit] [Creator:]

Description

一个数能被7整除或10进制中含有7被称为幸运数字。

Input

一个数n

Output

1—n幸运数字的和。

Sample Input Copy

21

Sample Output Copy

59

HINT

n<=1000

Source/Category