#include <bits/stdc++.h>
using namespace std;
long long ceil(long long a, long long b) {
  if (a % b != 0) return a / b + 1;
  return a / b;
}
long long power(long long x, long long y) {
  long long res = 1;
  x = x % 1000000007;
  while (y) {
    if (y & 1) res = (res * x) % 1000000007;
    y >>= 1;
    x = (x * x) % 1000000007;
  }
  return res % 1000000007;
}
long long inverse(long long n) { return power(n, 1000000007 - 2); }
long long nCr(long long n, long long r) {
  if (r == 0) return 1;
  long long fac[n + 1];
  fac[0] = 1;
  for (long long i = 1; i <= n; i++) {
    fac[i] = (i * fac[i - 1]) % 1000000007;
  }
  return (fac[n] * inverse(fac[r]) % 1000000007 * inverse(fac[n - r]) %
          1000000007) %
         1000000007;
}
vector<int> v;
int k;
long long sum(long long t) {
  long long s = 0;
  while (t != 0) {
    s += t % 10;
    t /= 10;
  }
  return s;
}
int main() {
  long long t;
  t = 1;
  while (t--) {
    cin >> k;
    for (int i = 1; v.size() < k; i++) {
      if (sum(i) == 10) v.push_back(i);
    }
    cout << v.back() << endl;
  }
}

### Prompt

Develop a solution in CPP 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;
long long ceil(long long a, long long b) {
  if (a % b != 0) return a / b + 1;
  return a / b;
}
long long power(long long x, long long y) {
  long long res = 1;
  x = x % 1000000007;
  while (y) {
    if (y & 1) res = (res * x) % 1000000007;
    y >>= 1;
    x = (x * x) % 1000000007;
  }
  return res % 1000000007;
}
long long inverse(long long n) { return power(n, 1000000007 - 2); }
long long nCr(long long n, long long r) {
  if (r == 0) return 1;
  long long fac[n + 1];
  fac[0] = 1;
  for (long long i = 1; i <= n; i++) {
    fac[i] = (i * fac[i - 1]) % 1000000007;
  }
  return (fac[n] * inverse(fac[r]) % 1000000007 * inverse(fac[n - r]) %
          1000000007) %
         1000000007;
}
vector<int> v;
int k;
long long sum(long long t) {
  long long s = 0;
  while (t != 0) {
    s += t % 10;
    t /= 10;
  }
  return s;
}
int main() {
  long long t;
  t = 1;
  while (t--) {
    cin >> k;
    for (int i = 1; v.size() < k; i++) {
      if (sum(i) == 10) v.push_back(i);
    }
    cout << v.back() << endl;
  }
}

```