import kotlin.math.sqrt

fun main() {
    var count = 0
    val n = nextInt()
    val dicstra = sizedArray(sqrt(n.toDouble()).toInt() + 1, true)
    (2..sqrt(n.toDouble()).toInt()).mapNotNull {
        (it * 2 until dicstra.size step it).forEach {
            dicstra[it] = false
        }
    }
    val primes = dicstra.mapIndexedNotNull { index, b ->
        if (index >= 2 && b) index else null
    }

    (1..n.minus(1)).forEach { c ->
        var cnt = 1
        var m = n - c
        primes.forEach { a ->
            if (m % a != 0) return@forEach
            var ex = 0

            while (m % a == 0) {
                ex++
                m /= a
            }
            cnt *= ex.plus(1)
        }
        if (m != 1) cnt *= 2
        count += cnt
    }
//    (1..n.minus(1)).forEach { c ->
//        var cntMap = mutableMapOf<Int, Int>()
//        var m = n - c
//        (2..sqrt(m.toDouble()).toInt()).forEach { a ->
//            if (m % a != 0) return@forEach
//            var ex = 0
//
//            while (m % a == 0) {
//                ex++
//                m /= a
//            }
//            cntMap[a] = ex
//        }
//        if (m != 1) cntMap[m] = 1
//        if (cntMap.isEmpty()) {
//            count++
//        } else {
//            count += cntMap.values.map { it + 1 }.reduce { acc, i -> acc * i }
//        }
//    }
    println(count)
}

// # Utils
// ## Input
fun next() = readLine()!!
fun nextInt() = next().toInt()
fun nextLong() = next().toLong()
fun nextDouble() = next().toDouble()
fun nextList() = next().split(" ")
fun nextIntList() = next().split(" ").map(String::toInt)
fun nextLongList() = next().split(" ").map(String::toLong)
fun nextDoubleList() = next().split(" ").map(String::toDouble)

// ## Array
inline fun <reified T> sizedArray(size: Int, default: T) = Array(size) { default }
inline fun <reified T> sized2DArray(row: Int, column: Int, default: T) = Array(row) { Array(column) { default } }

// ## mod^-1
//    [NOTE] CANNOT use this for 0, mod, 2mod, 3mod ...(return wrong value)
fun modinv(num: Long, mod: Long): Long {
    var a = num
    var b = mod
    var u = 1L
    var v = 0L
    while (b > 0) {
        val t = a.div(b)
        a -= t * b
        a = b.also { b = a } // swap a and b
        u -= t * v
        u = v.also { v = u } // swap u and v
    }
    u %= mod
    if (u < 0) u += mod
    return u
}

fun gcd(x: Int, y: Int): Int {
    fun innerGcd(x: Int, y: Int): Int {
        return if (x % y == 0) y else innerGcd(y, x % y)
    }
    return if (x >= y) innerGcd(x, y) else innerGcd(y, x)
}

fun gcd(x: Long, y: Long): Long {
    fun innerGcd(x: Long, y: Long): Long {
        return if (x % y == 0L) y else innerGcd(y, x % y)
    }
    return if (x >= y) innerGcd(x, y) else innerGcd(y, x)
}

// classes
class UnionFindTree(val size: Int) {
    private val r = sizedArray(size, -1)
    fun root(x: Int): Int {
        if (r[x] < 0) return x
        return root(r[x])
    }

    fun unite(x: Int, y: Int) {
        var rx = root(x)
        var ry = root(y)
        if (rx == ry) return
        if (r[rx] > r[ry]) {
            rx = ry.also { ry = rx }
        }
        r[rx] += r[ry]
        r[ry] = rx
    }

    fun size(x: Int) = -r[root(x)]

    override fun toString(): String {
        return r.joinToString(separator = ", ")
    }
}

Measured memory_bytes: 52024