function solution(n) {
var increaseNum = 0;
var increaseSum = 0;
var loop = 0;
var cnt = 0;
while (loop != n) {
increaseNum++;
if (increaseSum < n) {
increaseSum += increaseNum;
}
else if (increaseSum > n) {
loop++;
increaseNum = 0 + loop;
increaseSum = 0;
}
else if (increaseSum == n) {
loop++;
cnt++;
increaseNum = 0 + loop;
increaseSum = 0;
}
}
return cnt;
}