import sys
import math
n,k=map(int,input().split())

p=int(math.log2(n))

for i in range(p+2):
    if n//(k**i)<1:
        print(i)
        sys.exit() import sys sys import math math n,k=map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k p=int(math.log2(n)) p int(math.log2(n)) int math.log2(n) math.log2 math log2 n for i in range(p+2):
    if n//(k**i)<1:
        print(i)
        sys.exit() i range(p+2) range p+2 p 2 if n//(k**i)<1:
        print(i)
        sys.exit() n//(k**i)<1 n//(k**i) n k**i k i 1 print(i) print i sys.exit() sys.exit sys exit k=map(int,input().split()) map(int,input().split()) k p=int(math.log2(n)) int(math.log2(n)) p n,k=map(int,input().split()) map(int,input().split()) n
import sys
import math
n,k=map(int,input().split())

p=int(math.log2(n))

for i in range(p+2):
    if n//(k**i)<1:
        print(i)
        sys.exit()