1697:偶位回文

文件提交:无需freopen 内存限制:128 MB 时间限制:1.000 S
评测方式:普通裁判 命题人:
提交:5 解决:4

题目描述

如果一个偶数位的十进制数字是一个回文,则称它为偶位回文数。例如:lns="http://www.w3.org/1998/Math/MathML">1221 是一个偶位回文数,而 lns="http://www.w3.org/1998/Math/MathML">121 和 lns="http://www.w3.org/1998/Math/MathML">1234 都不是,因为前者是回文但不是偶位,后者是偶位但不是回文。

给定一个整数 lns="http://www.w3.org/1998/Math/MathML">,请找出正整数中前 lns="http://www.w3.org/1998/Math/MathML"> 个偶位回文数,计算并输出它们的和。

输入

单个整数表示 $n$

$1\le n\le 10^5$

输出

单个整数表示前 lns="http://www.w3.org/1998/Math/MathML"> 个偶位回文数的和。

样例输入-1 复制

5

样例输出-1 复制

165

样例输入-2 复制

2

样例输出-2 复制

33

提示

样例解释1:11+22+33+44+55=165

样例解释2:  11+22=33