#include<bits/stdc++.h> using namespace std; int n,h=0; int f(int x){ if(x==1) return n; else return f(x-1)*10+n; } int main(){ cin>>n; for(int i=1;i<=n;i++){ h=h+f(i); } cout<<h; return 0; } /************************************************************** Problem: 1245 User: jiangyuanfeng Language: C++ Result: Accepted Time:8 ms Memory:2072 kb ****************************************************************/