import java.util.Scanner

fun main(args: Array<String>) {
    val sc = Scanner(System.`in`)
    val n = sc.nextInt()
    val k = sc.nextInt()

    var ans = 1
    while (n / powInt(k, ans) >= 1) {
        ans++
    }
    print(ans)
}

fun powInt(x: Int, y: Int): Int {
    return if (y == 1) x else x * powInt(x, y - 1)
}
