fun main() = with(System.`in`.bufferedReader()){
val num = readLine().toInt()
var i = 1
var j = 1
var sum = 0
var cnt = 0
while(i<=num&&j<=num){
if(sum==num){
cnt++
}
if(sum<=num){
sum += j
j++
}
else{
sum -= i
i++
}
}
println(cnt+1)
}