#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  long long r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long fpow(long long n, long long k, int p = 1e9 + 7) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
vector<long long> prime(10000005 + 1);
void sieve() {
  prime[0] = prime[1] = 1;
  for (long long i = 2; i <= 10000005; i++) {
    if (!prime[i]) {
      prime[i] = i;
      for (long long j = i * i; j <= 10000005; j += i)
        if (!prime[j]) prime[j] = i;
    }
  }
}
vector<int> a(10000005);
int get(int n) {
  int sum = 0;
  while (n != 0) {
    sum += n % 10;
    n = n / 10;
  }
  return sum;
}
int main() {
  ios_base::sync_with_stdio(NULL), cin.tie(NULL), cout.tie(NULL);
  int k, i = 0;
  cin >> k;
  vector<int> d;
  d.push_back(19);
  while (d.size() < 10001) {
    if (get(d.back() + 9) == 10)
      d.push_back(d.back() + 9);
    else {
      int i = d.back() + 9;
      while (get(i) != 10) i++;
      d.push_back(i);
    }
  }
  cout << d[k - 1] << "\n";
  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;
long long gcd(long long a, long long b) {
  long long r;
  while (b) {
    r = a % b;
    a = b;
    b = r;
  }
  return a;
}
long long fpow(long long n, long long k, int p = 1e9 + 7) {
  long long r = 1;
  for (; k; k >>= 1) {
    if (k & 1) r = r * n % p;
    n = n * n % p;
  }
  return r;
}
vector<long long> prime(10000005 + 1);
void sieve() {
  prime[0] = prime[1] = 1;
  for (long long i = 2; i <= 10000005; i++) {
    if (!prime[i]) {
      prime[i] = i;
      for (long long j = i * i; j <= 10000005; j += i)
        if (!prime[j]) prime[j] = i;
    }
  }
}
vector<int> a(10000005);
int get(int n) {
  int sum = 0;
  while (n != 0) {
    sum += n % 10;
    n = n / 10;
  }
  return sum;
}
int main() {
  ios_base::sync_with_stdio(NULL), cin.tie(NULL), cout.tie(NULL);
  int k, i = 0;
  cin >> k;
  vector<int> d;
  d.push_back(19);
  while (d.size() < 10001) {
    if (get(d.back() + 9) == 10)
      d.push_back(d.back() + 9);
    else {
      int i = d.back() + 9;
      while (get(i) != 10) i++;
      d.push_back(i);
    }
  }
  cout << d[k - 1] << "\n";
  return 0;
}

```