Sequence of bits is encoded as follows. If the value of the previous bit in the original sequence differs from the value of the current bit, write 1 to the resulting sequence; otherwise, write 0. For the first bit of the sequence, the previous bit is considered to have the value 0.
Write a program that performs this encoding.
A string of no more than characters, consisting only of and , representing the sequence of bits to be encoded.
Print the resulting encoded sequence.
Example 1