import strutils,sequtils var N : int64 i: int64 s : seq[int64] N = stdin.readline.parseBiggestInt i = 1 s = @[] while i * i <= N: if N mod i == 0: s.add(($i & $(N div i)).parseBiggestInt) s.add(($(N div i) & $i).parseBiggestInt) i += 1 s = s.deduplicate echo s.len