The task was to get from a positive integer encoded in the base -2 it’s negative equivalent in the same base. So, to solve this task we need to split it into two parts. In first one we will use a formula to get an integer from its code. And in the second part, we will encode this negative integer back to base -2.