X,n = 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)
a=Base_10_to_n(X, n)
print(len(str(a))) X,n = map(int,input().split(" ")) X map(int,input().split(" ")) map int input().split(" ") ().split () 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) 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 a=Base_10_to_n(X, n) a Base_10_to_n(X, n) Base_10_to_n X n print(len(str(a))) print len(str(a)) len str(a) str a 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 = map(int,input().split(" ")) map(int,input().split(" ")) n a=Base_10_to_n(X, n) Base_10_to_n(X, n) a X,n = map(int,input().split(" ")) map(int,input().split(" ")) X
X,n = 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)
a=Base_10_to_n(X, n)
print(len(str(a)))