#include <bits/stdc++.h>
using namespace std;
const long long MAXn = 1e7 + 1e6;
const long long MXi = 10;
long long k, dp[MAXn];
bool ok(long long x) {
  long long cnt = 0;
  for (long long i = 0; i < MXi; ++i) {
    if (x > 0) {
      cnt += x % 10;
      x /= 10;
    } else
      break;
  }
  return cnt == 10;
}
long long doo() {
  long long ans = 0;
  for (long long i = 19; i < MAXn; ++i) {
    if (ok(i)) ans++;
    if (ans == k) return cout << i << endl, 0;
  }
}
signed main() {
  cin >> k;
  doo();
}

### Prompt

Construct a Cpp code solution to the problem outlined:

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 long long MAXn = 1e7 + 1e6;
const long long MXi = 10;
long long k, dp[MAXn];
bool ok(long long x) {
  long long cnt = 0;
  for (long long i = 0; i < MXi; ++i) {
    if (x > 0) {
      cnt += x % 10;
      x /= 10;
    } else
      break;
  }
  return cnt == 10;
}
long long doo() {
  long long ans = 0;
  for (long long i = 19; i < MAXn; ++i) {
    if (ok(i)) ans++;
    if (ans == k) return cout << i << endl, 0;
  }
}
signed main() {
  cin >> k;
  doo();
}

```