aa = input() [print(aa[x*8:(x+1)*8] + (8-len(aa[x*8:(x+1)*8])) * '0' if 8 > len(aa[x*8:(x+1)*8]) != 0 else aa[x*8:(x+1)*8]) for x in range(1 if len(aa)//8 == 0 else len(aa)//8 + (1 if len(aa)%8 != 0 and len(aa)//8 != 0 else 0))]