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

def dec2n(int1, int2):
  l = ""
  while int1 != 0:
    l += str(int1 % int2)
    int1 = int1 // int2
  return l[::-1]

if K == 10:
  print(len(str(N)))
else:
  print(len(dec2n(N, K))) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K def dec2n(int1, int2):
  l = ""
  while int1 != 0:
    l += str(int1 % int2)
    int1 = int1 // int2
  return l[::-1] dec2n l = "" l "" while int1 != 0:
    l += str(int1 % int2)
    int1 = int1 // int2
   int1 != 0 int1 0 l += str(int1 % int2) l str(int1 % int2) str int1 % int2 int1 int2 int1 = int1 // int2 int1 int1 // int2 int1 int2 return l[::-1] l[::-1] l ::-1 -1 int1 int1 int2 int2 if K == 10:
  print(len(str(N)))
else:
  print(len(dec2n(N, K))) K == 10 K 10 print(len(str(N))) print len(str(N)) len str(N) str N print(len(dec2n(N, K))) print len(dec2n(N, K)) len dec2n(N, K) dec2n N K N, K = map(int, input().split()) map(int, input().split()) N K = map(int, input().split()) map(int, input().split()) K def dec2n(int1, int2):
  l = ""
  while int1 != 0:
    l += str(int1 % int2)
    int1 = int1 // int2
  return l[::-1] def dec2n(int1, int2):
  l = ""
  while int1 != 0:
    l += str(int1 % int2)
    int1 = int1 // int2
  return l[::-1] dec2n
N, K = map(int, input().split())

def dec2n(int1, int2):
  l = ""
  while int1 != 0:
    l += str(int1 % int2)
    int1 = int1 // int2
  return l[::-1]

if K == 10:
  print(len(str(N)))
else:
  print(len(dec2n(N, K)))