let S = stdin.readline var s = newSeq[int](S.len) for i, c in S: s[i] = c.ord - ord('0') var dp = newSeq[int](1 shl S.len) var ans = 0 for state in 0..<(1 shl S.len): for i in 0..