def solve(N,K):
  if N == 0:
    return 1

  digit_num = 0
  while(1):
    if N >= pow(K,digit_num):
      digit_num += 1
    else:
      return digit_num
    
N, K = map(int,input().split())
ans = solve(N,K)
print(ans) def solve(N,K):
  if N == 0:
    return 1

  digit_num = 0
  while(1):
    if N >= pow(K,digit_num):
      digit_num += 1
    else:
      return digit_num
     solve if N == 0:
    return 1

   N == 0 N 0 return 1 1 digit_num = 0 digit_num 0 while(1):
    if N >= pow(K,digit_num):
      digit_num += 1
    else:
      return digit_num
     1 if N >= pow(K,digit_num):
      digit_num += 1
    else:
      return digit_num
     N >= pow(K,digit_num) N pow(K,digit_num) pow K digit_num digit_num += 1 digit_num 1 return digit_num digit_num N N K K N, K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K ans = solve(N,K) ans solve(N,K) solve N K print(ans) print ans ans = solve(N,K) solve(N,K) ans N, K = map(int,input().split()) map(int,input().split()) N def solve(N,K):
  if N == 0:
    return 1

  digit_num = 0
  while(1):
    if N >= pow(K,digit_num):
      digit_num += 1
    else:
      return digit_num
     def solve(N,K):
  if N == 0:
    return 1

  digit_num = 0
  while(1):
    if N >= pow(K,digit_num):
      digit_num += 1
    else:
      return digit_num
     solve K = map(int,input().split()) map(int,input().split()) K
def solve(N,K):
  if N == 0:
    return 1

  digit_num = 0
  while(1):
    if N >= pow(K,digit_num):
      digit_num += 1
    else:
      return digit_num
    
N, K = map(int,input().split())
ans = solve(N,K)
print(ans)