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