import sys result = [] cur_count = 0 cur_val = 0 for byte in sys.stdin.read(): if byte == '1': cur_val |= (1<