Type: Default 1000ms 128MiB

与7无关的数

You cannot submit for this problem because the contest is ended. You can click "Open in Problem Set" to view this problem in normal mode.

题目描述

一个正整数,如果它能被7\red{7}整除,或者它的十进制表示法中某一位上的数字为7\red{7},则称其为与7\red{7}相关的数.

现求所有小于等于n\red{n}(n<100\red{n < 100})的与7\red{7}无关的正整数的平方和.

输入格式

输入为一行,正整数n\red{n}(n<100\red{n < 100})

输出格式

输出一行,包含一个整数,即小于等于n\red{n}的所有与7\red{7}无关的正整数的平方和。

样例

输入数据

21

输出数据

2336