#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long mod = 1000000000 + 7;
inline long long gcd(long long a, long long b) {
  return b > 0 ? gcd(b, a % b) : a;
}
long long quick(long long a, long long b, long long p) {
  long long ans = 1 % p;
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a % p;
    a = a * a % p;
  }
  return ans;
}
const int maxn = 1.5e7 + 7;
int a[maxn], prime[maxn], cot, cnt[maxn];
bool vis[maxn];
void primeall() {
  memset(vis, true, sizeof(vis));
  for (int i = 2; i < maxn - 7; i++) {
    if (vis[i]) prime[++cot] = i;
    for (int j = 1; j <= cot; j++) {
      if (i * prime[j] > maxn - 7) break;
      vis[i * prime[j]] = false;
      if (i % prime[j] == 0) break;
    }
  }
}
int arr[100005];
void find() {
  int num = 1;
  for (int i = 10; i <= 20000000; i++) {
    int ans = 0;
    int tmp = i;
    while (tmp) {
      ans += tmp % 10;
      tmp /= 10;
    }
    if (ans == 10) {
      arr[num++] = i;
    }
  }
}
int main() {
  find();
  int m;
  cin >> m;
  cout << arr[m] << endl;
  return 0;
}

### 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;
const int INF = 0x3f3f3f3f;
const long long mod = 1000000000 + 7;
inline long long gcd(long long a, long long b) {
  return b > 0 ? gcd(b, a % b) : a;
}
long long quick(long long a, long long b, long long p) {
  long long ans = 1 % p;
  for (; b; b >>= 1) {
    if (b & 1) ans = ans * a % p;
    a = a * a % p;
  }
  return ans;
}
const int maxn = 1.5e7 + 7;
int a[maxn], prime[maxn], cot, cnt[maxn];
bool vis[maxn];
void primeall() {
  memset(vis, true, sizeof(vis));
  for (int i = 2; i < maxn - 7; i++) {
    if (vis[i]) prime[++cot] = i;
    for (int j = 1; j <= cot; j++) {
      if (i * prime[j] > maxn - 7) break;
      vis[i * prime[j]] = false;
      if (i % prime[j] == 0) break;
    }
  }
}
int arr[100005];
void find() {
  int num = 1;
  for (int i = 10; i <= 20000000; i++) {
    int ans = 0;
    int tmp = i;
    while (tmp) {
      ans += tmp % 10;
      tmp /= 10;
    }
    if (ans == 10) {
      arr[num++] = i;
    }
  }
}
int main() {
  find();
  int m;
  cin >> m;
  cout << arr[m] << endl;
  return 0;
}

```