#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int n;
  cin >> n;
  long long int ar[] = {
      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) {
    cout << ar[n - 1];
  } else
    cout << "lol";
  return 0;
}
