import sys

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

if K == 10:
    print(len(str(N)))
    sys.exit()

p = 0
while True:
    num = K ** p
    if N < num:
        break
    p += 1

print(p) import sys sys N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K if K == 10:
    print(len(str(N)))
    sys.exit() K == 10 K 10 print(len(str(N))) print len(str(N)) len str(N) str N sys.exit() sys.exit sys exit p = 0 p 0 while True:
    num = K ** p
    if N < num:
        break
    p += 1 True num = K ** p num K ** p K p if N < num:
        break
     N < num N num break p += 1 p 1 print(p) print p K = map(int, input().split()) map(int, input().split()) K N, K = map(int, input().split()) map(int, input().split()) N p = 0 0 p p += 1 1 p num = K ** p K ** p num
import sys

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

if K == 10:
    print(len(str(N)))
    sys.exit()

p = 0
while True:
    num = K ** p
    if N < num:
        break
    p += 1

print(p)
