# coding: utf-8
# Your code here!

n,k=map(int,input().split())
a=[]
while n>=1:
    s=n%k
    n=n//k
    a.append(s)

print(len(a)) n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k a=[] a [] while n>=1:
    s=n%k
    n=n//k
    a.append(s) n>=1 n 1 s=n%k s n%k n k n=n//k n n//k n k a.append(s) a.append a append s print(len(a)) print len(a) len a n=n//k n//k n k=map(int,input().split()) map(int,input().split()) k a=[] [] a s=n%k n%k s n,k=map(int,input().split()) map(int,input().split()) n
# coding: utf-8
# Your code here!

n,k=map(int,input().split())
a=[]
while n>=1:
    s=n%k
    n=n//k
    a.append(s)

print(len(a))