#template
def inputlist(): return [int(j) for j in input().split()]
def listinput(): return input().split()
#template
def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b)
N,K = inputlist()
print(len(base10to(N,K))) int(j) for j in input().split() for j in input().split() j input().split() ().split () input split for j in input().split() int(j) int j def inputlist(): return [int(j) for j in input().split()] inputlist def listinput(): return input().split()
#template listinput def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b) base10to if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
     int(n/b) int n/b n b return base10to(int(n/b), b) + str(n%b) base10to(int(n/b), b) + str(n%b) base10to(int(n/b), b) base10to int(n/b) int n/b n b b str(n%b) str n%b n b return str(n%b) str(n%b) str n%b n b n n b b N,K = inputlist() N inputlist() inputlist K print(len(base10to(N,K))) print len(base10to(N,K)) len base10to(N,K) base10to N K N,K = inputlist() inputlist() N def inputlist(): return [int(j) for j in input().split()] def inputlist(): return [int(j) for j in input().split()] inputlist def listinput(): return input().split()
#template def listinput(): return input().split()
#template listinput def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b) def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b) base10to K = inputlist() inputlist() K
#template
def inputlist(): return [int(j) for j in input().split()]
def listinput(): return input().split()
#template
def base10to(n, b):
    if (int(n/b)):
        return base10to(int(n/b), b) + str(n%b)
    return str(n%b)
N,K = inputlist()
print(len(base10to(N,K)))