"use strict"
function main(arg) {
    var N = arg.trim().split("\n")[0]
    var ans = 0
    // for (var i = N; i > 0; i -= 2) {
    //     result *= i
    //     if (result % 10 === 0) {
    //         result /= 10
    //         ans++
    //     }
    // }
    // console.log(ans)
    for (var i = N; i > 0; i -= 2) {
        // var res = divide10(i)
        // ans += res[0]
        if (i%10 === 0) {
            // ans += divide10(i)
            ans += String(i).split("").length -1
        }
    }
    console.log(ans)
    // console.log("100".split("").length -1)
}

function divide10(x) {
    var count = 0
    while (1) {
        if (x %  10 !== 0) {
            // return [count, x]
            return count
        }
        x /= 10
        count++
    }
}
main(require('fs').readFileSync('/dev/stdin', 'utf8'));