main = interact $ unlines . map (show . sumOfCI . read) . init . lines

sumOfCI n = length $ filter isSeq [1..half]
 where
  half = div (n+1) 2
  isSeq x = sum (takeWhile (\n' -> sum [x..n'] <= n) [x..half]) == n