#!/usr/bin/env python3
def main():
    N, K = map(int, input().split())

    for i in range(10 ** 9):
        if N <= K ** i - 1:
            print(i)
            break


if __name__ == '__main__':
    main() def main():
    N, K = map(int, input().split())

    for i in range(10 ** 9):
        if N <= K ** i - 1:
            print(i)
            break main N, K = map(int, input().split()) N map(int, input().split()) map int input().split() ().split () input split K for i in range(10 ** 9):
        if N <= K ** i - 1:
            print(i)
            break i range(10 ** 9) range 10 ** 9 10 9 if N <= K ** i - 1:
            print(i)
            break N <= K ** i - 1 N K ** i - 1 K ** i K i 1 print(i) print i break if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N, K = map(int, input().split())

    for i in range(10 ** 9):
        if N <= K ** i - 1:
            print(i)
            break def main():
    N, K = map(int, input().split())

    for i in range(10 ** 9):
        if N <= K ** i - 1:
            print(i)
            break main
#!/usr/bin/env python3
def main():
    N, K = map(int, input().split())

    for i in range(10 ** 9):
        if N <= K ** i - 1:
            print(i)
            break


if __name__ == '__main__':
    main()
