#include <bits/stdc++.h>
using namespace std;
int a[200005], val[2000006];
bool vis[2000006] = {0};
bool check(long long int a) {
  long long int n, ans = 0, y;
  n = a;
  while (n > 0) {
    y = n % 10;
    ans += y;
    n /= 10;
  }
  return (ans == 10 ? true : false);
}
int main() {
  {
    long long int n, i, d, c = 0, m, x, k, j, y = 0, w, z = 0, ans = 0,
                           maxm = 0;
    cin >> n;
    c = n;
    std::vector<long long int> v;
    for (i = 1; i < 20000000; i++) {
      if (check(i) == true) v.push_back(i);
    }
    cout << v[n - 1] << "\n";
  }
}

### Prompt

Please provide a cpp coded solution to the problem described below:

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;
int a[200005], val[2000006];
bool vis[2000006] = {0};
bool check(long long int a) {
  long long int n, ans = 0, y;
  n = a;
  while (n > 0) {
    y = n % 10;
    ans += y;
    n /= 10;
  }
  return (ans == 10 ? true : false);
}
int main() {
  {
    long long int n, i, d, c = 0, m, x, k, j, y = 0, w, z = 0, ans = 0,
                           maxm = 0;
    cin >> n;
    c = n;
    std::vector<long long int> v;
    for (i = 1; i < 20000000; i++) {
      if (check(i) == true) v.push_back(i);
    }
    cout << v[n - 1] << "\n";
  }
}

```