fun binarySearch(array: LongArray, target: Long): Boolean {
    var left = 0
    var right = array.size
    while(left < right){
        val mid = (left + right) / 2
        if (array[mid] == target) return true
        if (array[mid] < target) {
            left = mid + 1
        }else {
            right = mid
        }
    }
    return false
}
fun main(args: Array<String>?): Unit {
    val s = readLine()!!.trim().toInt()
    val sum = LongArray(s + 1){it * (it + 1L) / 2}
    val divisors = (2 .. s).filter{s % it == 0}
    val count = IntArray(s + 1){0}.also{it[1] = 1}
    for (n in sum) {
        for (d in divisors) {
            if (n >= d && binarySearch(sum, n - d)) {
                count[d]++
            }
        }
    }
    println(
            (divisors + 1).map{d -> count[d].toLong() * count[s / d]}.sum()
    )
}
