Polycarp invent new binary protocol datum transmission he encode positive integer decimal number binary string follow algorithm each digit represent number 1 character equal value digit 0 zero one Digits write order correspond number separate single 0 character Though Polycarp learn encode number idea decode Help calculate decode number