Negative Base

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

It is known that the binary positional numeral system works as follows: denoting a nonnegative integer xx as a string "x_kx_2x_1x_0x\_k \ldots x\_2 x\_1 x\_0" of zeroes and ones means that x=x_k2k++x_222+x_121+x_020x = x\_k \cdot 2^k + \ldots + x\_2 \cdot 2^2 + x\_1 \cdot 2^1 + x\_0 \cdot 2^0. The leading zeroes are omitted, so x_k=1x\_k = 1, except the case when x=0x = 0 which is denoted as "00".

The negabinary notation works in a similar way: denoting an number xx as a string "x_kx_2x_1x_0x\_k \ldots x\_2 x\_1 x\_0" of zeroes and ones means that x=x_k(2)k++x_2(2)2+x_1(2)1+x_0(2)0x = x\_k \cdot (-2)^k + \ldots + x\_2 \cdot (-2)^2 + x\_1 \cdot (-2)^1 + x\_0 \cdot (-2)^0. The leading zeroes are also omitted, so x_k=1x\_k = 1, except the case when x=0x = 0 which is denoted as "00". It turns out that this notation has a unique representation for every integer (as opposed to only nonnegative integers).

Negabinary notation of numbers from 7-7 to 88:

7-7100110011111
6-61110111022110110
5-51111111133111111
4-41100110044100100
3-31101110155101101
2-21010661101011010
1-11111771101111011
0000881100011000

Given an integer kk, find a number which has at least kk consecutive zeroes in its negabinary representation. Of all such numbers, find the one which has the least absolute value. If there are still several answers, pick the one with the shortest negabinary representation.

입력

The first line of input contains an integer kk (1k301 \le k \le 30).

출력

Print one integer: the answer to the problem.