# -*- coding: utf-8 -*-
import math

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

n = int(math.sqrt(N)) + 1

for i in range(n, -1, -1):
  if K ** i <= N:
    print(i+1)
    exit() import math math N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K n = int(math.sqrt(N)) + 1 n int(math.sqrt(N)) + 1 int(math.sqrt(N)) int math.sqrt(N) math.sqrt math sqrt N 1 for i in range(n, -1, -1):
  if K ** i <= N:
    print(i+1)
    exit() i range(n, -1, -1) range n -1 -1 if K ** i <= N:
    print(i+1)
    exit() K ** i <= N K ** i K i N print(i+1) print i+1 i 1 exit() exit K = map(int, input().split()) map(int, input().split()) K N, K = map(int, input().split()) map(int, input().split()) N n = int(math.sqrt(N)) + 1 int(math.sqrt(N)) + 1 n
# -*- coding: utf-8 -*-
import math

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

n = int(math.sqrt(N)) + 1

for i in range(n, -1, -1):
  if K ** i <= N:
    print(i+1)
    exit()