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


def base(value, n):  # 10 => 2
    result = ''
    tmp = int(value)
    while tmp >= n:
        result = str(tmp % n) + result
        tmp = int(tmp / n)
    result = str(tmp % n) + result
    return result


print(len(str(base(N, K)))) N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K def base(value, n):  # 10 => 2
    result = ''
    tmp = int(value)
    while tmp >= n:
        result = str(tmp % n) + result
        tmp = int(tmp / n)
    result = str(tmp % n) + result
    return result base result = '' result '' tmp = int(value) tmp int(value) int value while tmp >= n:
        result = str(tmp % n) + result
        tmp = int(tmp / n)
     tmp >= n tmp n result = str(tmp % n) + result result str(tmp % n) + result str(tmp % n) str tmp % n tmp n result tmp = int(tmp / n) tmp int(tmp / n) int tmp / n tmp n result = str(tmp % n) + result result str(tmp % n) + result str(tmp % n) str tmp % n tmp n result return result result value value n n print(len(str(base(N, K)))) print len(str(base(N, K))) len str(base(N, K)) str base(N, K) base N K N, K = map(int, input().split()) map(int, input().split()) N def base(value, n):  # 10 => 2
    result = ''
    tmp = int(value)
    while tmp >= n:
        result = str(tmp % n) + result
        tmp = int(tmp / n)
    result = str(tmp % n) + result
    return result def base(value, n):  # 10 => 2
    result = ''
    tmp = int(value)
    while tmp >= n:
        result = str(tmp % n) + result
        tmp = int(tmp / n)
    result = str(tmp % n) + result
    return result base K = map(int, input().split()) map(int, input().split()) K
N, K = map(int, input().split())


def base(value, n):  # 10 => 2
    result = ''
    tmp = int(value)
    while tmp >= n:
        result = str(tmp % n) + result
        tmp = int(tmp / n)
    result = str(tmp % n) + result
    return result


print(len(str(base(N, K))))