import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

n, k = map(int, input().split())

cnt = 0
while 0 < n:
    n //= k
    cnt += 1

print(cnt) import sys sys sys.setrecursionlimit(10**7) sys.setrecursionlimit sys setrecursionlimit 10**7 10 7 input = sys.stdin.readline input sys.stdin.readline sys.stdin sys stdin readline n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k cnt = 0 cnt 0 while 0 < n:
    n //= k
    cnt += 1 0 < n 0 n n //= k n k cnt += 1 cnt 1 print(cnt) print cnt cnt = 0 0 cnt n //= k k n n, k = map(int, input().split()) map(int, input().split()) n cnt += 1 1 cnt k = map(int, input().split()) map(int, input().split()) k input = sys.stdin.readline sys.stdin.readline input
import sys
sys.setrecursionlimit(10**7)
input = sys.stdin.readline

n, k = map(int, input().split())

cnt = 0
while 0 < n:
    n //= k
    cnt += 1

print(cnt)
