import math
N, K = map(int, input().split())
if N <= K:
    N = str(N)
    print(len(N))
else:
    print(math.ceil(math.log(N, K))) import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K if N <= K:
    N = str(N)
    print(len(N))
else:
    print(math.ceil(math.log(N, K))) N <= K N K N = str(N) N str(N) str N print(len(N)) print len(N) len N print(math.ceil(math.log(N, K))) print math.ceil(math.log(N, K)) math.ceil math ceil math.log(N, K) math.log math log N K N = str(N) str(N) N N, K = map(int, input().split()) map(int, input().split()) N K = map(int, input().split()) map(int, input().split()) K
import math
N, K = map(int, input().split())
if N <= K:
    N = str(N)
    print(len(N))
else:
    print(math.ceil(math.log(N, K)))
