n,k = map(int,input().split())
for i in range(n):
    n = n // k
    if n == 0:
        print(i + 1)
        exit() n,k = map(int,input().split()) n map(int,input().split()) map int input().split() ().split () input split k for i in range(n):
    n = n // k
    if n == 0:
        print(i + 1)
        exit() i range(n) range n n = n // k n n // k n k if n == 0:
        print(i + 1)
        exit() n == 0 n 0 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 = n // k n // k n
n,k = map(int,input().split())
for i in range(n):
    n = n // k
    if n == 0:
        print(i + 1)
        exit()