let N = Int(readLine()!)! var start = 1, end = 1, sum = 1, answer = 1 while end != N { if sum < N { end += 1 sum += end } else if sum > N { sum -= start start += 1 } else { answer += 1 end += 1 sum += end } } print(answer)