#include <iostream>
using namespace std;
int dj(int n) {
int a = 1;
if (n > 1) {
for (int i = 1; i < n; i++) {
a = a * 10 + 1;
cout << a << endl;
}
}
return a;
}
int main() {
int s = 0, m;
cin >> m;
for (int i = 1; i <= m ; i++) {
s = s + i * dj(i);
}
cout << s << endl;
return 0;
}