#include <bits/stdc++.h>
using namespace std;
bool sortbysecdesc(const pair<int, int> &a, const pair<int, int> &b) {
  return a.second > b.second;
}
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int findGCD(long long a[], long long n) {
  int result = a[0];
  for (int i = 1; i < n; i++) {
    result = gcd(a[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
long long sum(long long a) {
  long long sum1 = 0;
  while (a != 0) {
    sum1 += a % 10;
    a /= 10;
  }
  return sum1;
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long i = 0, n, count = 0;
  cin >> n;
  for (int i = 0; i < int(100000000); i++) {
    if (sum(i) == 10) count++;
    if (count == n) {
      cout << i << endl;
      break;
    }
  }
  return 0;
}

### Prompt

Create a solution in Cpp for 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;
bool sortbysecdesc(const pair<int, int> &a, const pair<int, int> &b) {
  return a.second > b.second;
}
bool sortinrev(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.first > b.first);
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
long long lcm(long long a, long long b) { return (a * b) / gcd(a, b); }
int findGCD(long long a[], long long n) {
  int result = a[0];
  for (int i = 1; i < n; i++) {
    result = gcd(a[i], result);
    if (result == 1) {
      return 1;
    }
  }
  return result;
}
long long sum(long long a) {
  long long sum1 = 0;
  while (a != 0) {
    sum1 += a % 10;
    a /= 10;
  }
  return sum1;
}
int32_t main() {
  ios_base::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  long long i = 0, n, count = 0;
  cin >> n;
  for (int i = 0; i < int(100000000); i++) {
    if (sum(i) == 10) count++;
    if (count == n) {
      cout << i << endl;
      break;
    }
  }
  return 0;
}

```