import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, K = map(int, readline().split())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

def main():
    converted = Base_10_to_n(N,K)
    print(len(converted))

main() import sys sys read = sys.stdin.buffer.read read sys.stdin.buffer.read sys.stdin.buffer sys.stdin sys stdin buffer read readline = sys.stdin.buffer.readline readline sys.stdin.buffer.readline sys.stdin.buffer sys.stdin sys stdin buffer readline readlines = sys.stdin.buffer.readlines readlines sys.stdin.buffer.readlines sys.stdin.buffer sys.stdin sys stdin buffer readlines sys.setrecursionlimit(10 ** 7) sys.setrecursionlimit sys setrecursionlimit 10 ** 7 10 7 N, K = map(int, readline().split()) N map(int, readline().split()) map int readline().split() ().split () readline split K def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n) Base_10_to_n if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
     int(X/n) int X/n X n return Base_10_to_n(int(X/n), n)+str(X%n) Base_10_to_n(int(X/n), n)+str(X%n) Base_10_to_n(int(X/n), n) Base_10_to_n int(X/n) int X/n X n n str(X%n) str X%n X n return str(X%n) str(X%n) str X%n X n X X n n def main():
    converted = Base_10_to_n(N,K)
    print(len(converted)) main converted = Base_10_to_n(N,K) converted Base_10_to_n(N,K) Base_10_to_n N K print(len(converted)) print len(converted) len converted main() main read = sys.stdin.buffer.read sys.stdin.buffer.read read def main():
    converted = Base_10_to_n(N,K)
    print(len(converted)) def main():
    converted = Base_10_to_n(N,K)
    print(len(converted)) main N, K = map(int, readline().split()) map(int, readline().split()) N K = map(int, readline().split()) map(int, readline().split()) K readlines = sys.stdin.buffer.readlines sys.stdin.buffer.readlines readlines def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n) def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n) Base_10_to_n readline = sys.stdin.buffer.readline sys.stdin.buffer.readline readline
import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
sys.setrecursionlimit(10 ** 7)

N, K = map(int, readline().split())

def Base_10_to_n(X, n):
    if (int(X/n)):
        return Base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

def main():
    converted = Base_10_to_n(N,K)
    print(len(converted))

main()