#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int N = 1e5 + 1, M = N;
int mpow();
int bs();
int a[N];
bool cp(int n) {
  int sum = 0;
  while (n) sum += n % 10, n /= 10;
  if (sum == 10) return true;
  return false;
}
void solve() {
  int k;
  cin >> k;
  int i = 18;
  while (k) {
    i++;
    if (cp(i)) k--;
  }
  cout << i << endl;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % mod;
    base = ((long long)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int bs(int n, int target) {
  int l = 0, r = n - 1;
  while (l <= r) {
    int mid = l + (r - l) / 2;
    if (a[mid] == target) return target;
    if (a[mid] > target)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return -1;
}

### Prompt

Generate a Cpp solution to the following problem:

We consider a positive integer perfect, if and only if the sum of its digits is exactly 10. Given a positive integer k, your task is to find the k-th smallest perfect positive integer.

Input

A single line with a positive integer k (1 ≤ k ≤ 10 000).

Output

A single number, denoting the k-th smallest perfect integer.

Examples

Input

1


Output

19


Input

2


Output

28

Note

The first perfect integer is 19 and the second one is 28.

### Response

```cpp
#include <bits/stdc++.h>
using namespace std;
const int mod = 1000000007;
const int N = 1e5 + 1, M = N;
int mpow();
int bs();
int a[N];
bool cp(int n) {
  int sum = 0;
  while (n) sum += n % 10, n /= 10;
  if (sum == 10) return true;
  return false;
}
void solve() {
  int k;
  cin >> k;
  int i = 18;
  while (k) {
    i++;
    if (cp(i)) k--;
  }
  cout << i << endl;
}
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
int mpow(int base, int exp) {
  base %= mod;
  int result = 1;
  while (exp > 0) {
    if (exp & 1) result = ((long long)result * base) % mod;
    base = ((long long)base * base) % mod;
    exp >>= 1;
  }
  return result;
}
int bs(int n, int target) {
  int l = 0, r = n - 1;
  while (l <= r) {
    int mid = l + (r - l) / 2;
    if (a[mid] == target) return target;
    if (a[mid] > target)
      r = mid - 1;
    else
      l = mid + 1;
  }
  return -1;
}

```