import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def conv_num2x(num, x):
    if (int(num/x)):
        return conv_num2x(int(num/x), x)+str(num%x)
    return str(num%x)

def main():
    N,K = LI()
    num_k = conv_num2x(N,K)
    print(len(str(num_k)))

main()
 import bisect,collections,copy,heapq,itertools,math,numpy,string bisect collections copy heapq itertools math numpy string import sys sys sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 def S(): return sys.stdin.readline().rstrip() S def I(): return int(sys.stdin.readline().rstrip()) I def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def LS(): return list(sys.stdin.readline().rstrip().split()) LS def conv_num2x(num, x):
    if (int(num/x)):
        return conv_num2x(int(num/x), x)+str(num%x)
    return str(num%x) conv_num2x if (int(num/x)):
        return conv_num2x(int(num/x), x)+str(num%x)
     int(num/x) int num/x num x return conv_num2x(int(num/x), x)+str(num%x) conv_num2x(int(num/x), x)+str(num%x) conv_num2x(int(num/x), x) conv_num2x int(num/x) int num/x num x x str(num%x) str num%x num x return str(num%x) str(num%x) str num%x num x num num x x def main():
    N,K = LI()
    num_k = conv_num2x(N,K)
    print(len(str(num_k))) main N,K = LI() N LI() LI K num_k = conv_num2x(N,K) num_k conv_num2x(N,K) conv_num2x N K print(len(str(num_k))) print len(str(num_k)) len str(num_k) str num_k main() main def main():
    N,K = LI()
    num_k = conv_num2x(N,K)
    print(len(str(num_k))) def main():
    N,K = LI()
    num_k = conv_num2x(N,K)
    print(len(str(num_k))) main def I(): return int(sys.stdin.readline().rstrip()) def I(): return int(sys.stdin.readline().rstrip()) I def LS(): return list(sys.stdin.readline().rstrip().split()) def LS(): return list(sys.stdin.readline().rstrip().split()) LS def S(): return sys.stdin.readline().rstrip() def S(): return sys.stdin.readline().rstrip() S def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) def LI(): return list(map(int,sys.stdin.readline().rstrip().split())) LI def conv_num2x(num, x):
    if (int(num/x)):
        return conv_num2x(int(num/x), x)+str(num%x)
    return str(num%x) def conv_num2x(num, x):
    if (int(num/x)):
        return conv_num2x(int(num/x), x)+str(num%x)
    return str(num%x) conv_num2x
import bisect,collections,copy,heapq,itertools,math,numpy,string
import sys
sys.setrecursionlimit(10**7)

def S(): return sys.stdin.readline().rstrip()
def I(): return int(sys.stdin.readline().rstrip())
def LI(): return list(map(int,sys.stdin.readline().rstrip().split()))
def LS(): return list(sys.stdin.readline().rstrip().split())

def conv_num2x(num, x):
    if (int(num/x)):
        return conv_num2x(int(num/x), x)+str(num%x)
    return str(num%x)

def main():
    N,K = LI()
    num_k = conv_num2x(N,K)
    print(len(str(num_k)))

main()

