#include <bits/stdc++.h>
using namespace std;
int main(){
    int a,s,d,f,g,h;
    cin>>a;
    s=(a+1)*10;
    d=(a+2)*100;
    f=(a+3)*1000;
    g=(a+4)*10000; 
    h=a+s+d+f+g;
    cout<<h;
}
//1621
/**************************************************************
	Problem: 1621
	User: huangluowei
	Language: C++
	Result: Accepted
	Time:10 ms
	Memory:2072 kb
****************************************************************/