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)
x2 = Base_10_to_n(N,K)
print(len(x2)) 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 x2 = Base_10_to_n(N,K) x2 Base_10_to_n(N,K) Base_10_to_n N K print(len(x2)) print len(x2) len x2 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 N,K=map(int,input().split()) map(int,input().split()) N x2 = Base_10_to_n(N,K) Base_10_to_n(N,K) x2 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)
x2 = Base_10_to_n(N,K)
print(len(x2))
