#include <iostream> using namespace std; int main(void) { int n; while (cin >> n) { int sum=0; int num=0; for (int i=1; i<=n; i++) { num=num*10+i; sum+=num; } cout<<sum<<endl; } return 0; }