#include<bits/stdc++.h>
#define $$ long long int
#define pb push_back
#define db pop_back
#define q2(n) (n%2)==0
#define vp vector<pair <$$,$$> >
#define vctr vector<$$>
#define in(a) scanf("%lld",&a)
#define out(a) printf("%lld ",a)
#define loop(i,m,p) for ($$ i = m; i < p; i++)
#define loopn(i,m,p) for ($$ i = p-1; i >=m; --i)

using namespace std;


int main()
{
    $$ n;
    cin>>n;
    ar[30]={1,2,3,4,5,6,7,8,9,19,29,39,49,59,69,79,89,89,99,199,299,399,499,599,699,799,899,999,1999,2999,3999,4999,5999,6999,7999,8999,9999};
    if (n<30)
    {
    	/* code */cout<<ar[n-1];
    }
    else
    	cout<<"lol";



return 0;
}
