import kotlin.math.* fun main(){println(abs(log10(readLine()!!.toDouble())-9).toInt())}