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


def base_10_to_n(X, n):
    if (int(X/n)):
        return base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

rslt = base_10_to_n(n, k)

print(len(rslt)) n, k = map(int, input().split()) n map(int, input().split()) map int input().split() ().split () input split k def base_10_to_n(X, n):
    if (int(X/n)):
        return base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n) base_10_to_n if (int(X/n)):
        return base_10_to_n(int(X/n), n)+str(X%n)
     int(X/n) int X/n X n return base_10_to_n(int(X/n), n)+str(X%n) base_10_to_n(int(X/n), n)+str(X%n) base_10_to_n(int(X/n), n) base_10_to_n int(X/n) int X/n X n n str(X%n) str X%n X n return str(X%n) str(X%n) str X%n X n X X n n rslt = base_10_to_n(n, k) rslt base_10_to_n(n, k) base_10_to_n n k print(len(rslt)) print len(rslt) len rslt rslt = base_10_to_n(n, k) base_10_to_n(n, k) rslt n, k = map(int, input().split()) map(int, input().split()) n def base_10_to_n(X, n):
    if (int(X/n)):
        return base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n) def base_10_to_n(X, n):
    if (int(X/n)):
        return base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n) base_10_to_n k = map(int, input().split()) map(int, input().split()) k
n, k = map(int, input().split())


def base_10_to_n(X, n):
    if (int(X/n)):
        return base_10_to_n(int(X/n), n)+str(X%n)
    return str(X%n)

rslt = base_10_to_n(n, k)

print(len(rslt))