#include <bits/stdc++.h>
using namespace std;
bool cmp(int a, int b) { return a > b; }
const long Max = 1e9;
int power(long long first, long long n, long long m) {
  if (n == 0) return 1ll;
  long long p = power(first, n / 2, m) % m;
  if (n & 1)
    return (first % m) * (p * p % m) % m;
  else
    return (p * p % m);
}
const int mod = 1000000007;
const int maxx = 2 * (int)1e5 + 3;
int n;
set<long long> s;
long long pow2[33];
int a, b, h, c;
int f[maxx];
bool ok(int i) {
  int ans = 0;
  while (i != 0) {
    ans += (i % 10);
    i /= 10;
  }
  if (ans == 10) return true;
  return false;
}
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  int k;
  cin >> k;
  vector<int> res;
  for (int i = 19; i <= 10800100; ++i) {
    if (ok(i)) {
      res.push_back(i);
    }
  }
  cout << res[k - 1];
  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;
bool cmp(int a, int b) { return a > b; }
const long Max = 1e9;
int power(long long first, long long n, long long m) {
  if (n == 0) return 1ll;
  long long p = power(first, n / 2, m) % m;
  if (n & 1)
    return (first % m) * (p * p % m) % m;
  else
    return (p * p % m);
}
const int mod = 1000000007;
const int maxx = 2 * (int)1e5 + 3;
int n;
set<long long> s;
long long pow2[33];
int a, b, h, c;
int f[maxx];
bool ok(int i) {
  int ans = 0;
  while (i != 0) {
    ans += (i % 10);
    i /= 10;
  }
  if (ans == 10) return true;
  return false;
}
signed main() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr);
  int k;
  cin >> k;
  vector<int> res;
  for (int i = 19; i <= 10800100; ++i) {
    if (ok(i)) {
      res.push_back(i);
    }
  }
  cout << res[k - 1];
  return 0;
}

```