919_B. Perfect Number
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.
```python
rpta = []


def solve(pos, sum, arr):
    # if len(rpta) > 30:
    #     return
    # # print(sum)
    if sum > 10 or pos >= 9:
        return
    else:
        if sum == 10:
            # print(sum, arr)
            rpta.append(arr)
        inicio = 0 if pos > 0 else 1
        for i in range(inicio, min(10,10-sum+1) ):
            solve(pos + 1, sum + i, arr * 10 + i)


k = input()
solve(0, 0, 0)
# print(len(rpta))
rpta.sort()
# for i in range(0,len(rpta)):
#     print(i , rpta[i])
# print(rpta)
print(rpta[int(k)-1])

```