#include <bits/stdc++.h>
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1, -1, -1, 0, 1, -1, 0, 1};
long long a[100005];
bool digsum(long long n) {
  long long sum = 0;
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return (sum == 10);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int p;
  cin >> p;
  int k = 0;
  for (int i = 1;; i++) {
    if (digsum(i)) {
      a[k++] = i;
    }
    if (k == p) {
      cout << i << endl;
      return 0;
    }
  }
  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>
using namespace std;
int dx[] = {0, 0, 1, -1};
int dy[] = {1, -1, 0, 0};
int dx8[] = {0, 0, 1, 1, 1, -1, -1, -1};
int dy8[] = {1, -1, -1, 0, 1, -1, 0, 1};
long long a[100005];
bool digsum(long long n) {
  long long sum = 0;
  while (n > 0) {
    sum += n % 10;
    n /= 10;
  }
  return (sum == 10);
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int p;
  cin >> p;
  int k = 0;
  for (int i = 1;; i++) {
    if (digsum(i)) {
      a[k++] = i;
    }
    if (k == p) {
      cout << i << endl;
      return 0;
    }
  }
  return 0;
}

```