Happy New Year!

AtCoder
IDabc234_c
Time2000ms
Memory256MB
Difficulty
Among the positive integers that consist of $0$'s and $2$'s when written in base $10$, find the $K$\-th smallest integer. ## Constraints * $K$ is an integer between $1$ and $10^{18}$ (inclusive). ## Input Input is given from Standard Input in the following format: $K$ [samples]
Samples
Input #1
3
Output #1
22

The positive integers that consist of $0$'s and $2$'s when written in base $10$ are $2,20,22,\dots$ in ascending order.  
The $(K=)$ $3$\-rd of them, which is $22$, should be printed.
Input #2
11
Output #2
2022
Input #3
923423423420220108
Output #3
220022020000202020002022022000002020002222002200002022002200

Note that the exact value of the answer must be printed as an integer, even if it is big.
API Response (JSON)
{
  "problem": {
    "name": "Happy New Year!",
    "description": {
      "content": "Among the positive integers that consist of $0$'s and $2$'s when written in base $10$, find the $K$\\-th smallest integer.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc234_c"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "Among the positive integers that consist of $0$'s and $2$'s when written in base $10$, find the $K$\\-th smallest integer.\n\n## Constraints\n\n*   $K$ is an integer between $1$ and $10^{18}$ (inclusive).\n...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments