#include <bits/stdc++.h>
const int N = 1000 * 1000 + 10;
const int mod = 1000 * 1000 * 1000 + 7;
const int NN = 1000 * 1000 * 1000;
using namespace std;
long long int sortbyfirst(const pair<long long int, string>& a,
                          const pair<long long int, string>& b) {
  return (a.first > b.first);
}
long long int fact(long long int n) {
  if (n > 1)
    return n * fact(n - 1);
  else
    return 1;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
int power(int x, unsigned int y) {
  int res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
int sum(long long int a) {
  long long int ans = 0;
  while (a) {
    ans += a % 10;
    a = a / 10;
  }
  return ans;
}
int main() {
  long long int i, n, a = 0;
  cin >> n;
  for (i = 0; i < n;) {
    if (sum(a) == 10) {
      i++;
    }
    a++;
  }
  cout << a - 1;
  return 0;
}

### Prompt

In cpp, your task is to solve 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>
const int N = 1000 * 1000 + 10;
const int mod = 1000 * 1000 * 1000 + 7;
const int NN = 1000 * 1000 * 1000;
using namespace std;
long long int sortbyfirst(const pair<long long int, string>& a,
                          const pair<long long int, string>& b) {
  return (a.first > b.first);
}
long long int fact(long long int n) {
  if (n > 1)
    return n * fact(n - 1);
  else
    return 1;
}
long long int gcd(long long int a, long long int b) {
  if (a == 0)
    return b;
  else
    return gcd(b % a, a);
}
int power(int x, unsigned int y) {
  int res = 1;
  while (y > 0) {
    if (y & 1) res = res * x;
    y = y >> 1;
    x = x * x;
  }
  return res;
}
int sum(long long int a) {
  long long int ans = 0;
  while (a) {
    ans += a % 10;
    a = a / 10;
  }
  return ans;
}
int main() {
  long long int i, n, a = 0;
  cin >> n;
  for (i = 0; i < n;) {
    if (sum(a) == 10) {
      i++;
    }
    a++;
  }
  cout << a - 1;
  return 0;
}

```