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

t = 0
for i in range(N):
    N = N//K
    t += 1
    if N == 0:
        print(t)
        exit() N, K = map(int,input().split()) N map(int,input().split()) map int input().split() ().split () input split K t = 0 t 0 for i in range(N):
    N = N//K
    t += 1
    if N == 0:
        print(t)
        exit() i range(N) range N N = N//K N N//K N K t += 1 t 1 if N == 0:
        print(t)
        exit() N == 0 N 0 print(t) print t exit() exit N, K = map(int,input().split()) map(int,input().split()) N t = 0 0 t K = map(int,input().split()) map(int,input().split()) K N = N//K N//K N t += 1 1 t
N, K = map(int,input().split())

t = 0
for i in range(N):
    N = N//K
    t += 1
    if N == 0:
        print(t)
        exit()