#include<bits/stdc++.h>
using namespace std;
int main(){
int g,G,s,b,q,w,z;
cin>>g;
G=g;
s=g+1;
b=s+1;
q=b+1;
w=q+1;
z=G*1+s*10+b*100+q*1000+w*10000;
cout<<z;
}
/**************************************************************
Problem: 1621
User: huanglingkai
Language: C++
Result: Accepted
Time:7 ms
Memory:2072 kb
****************************************************************/