import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N, K = map(int, readline().split())

    digit = 0
    cur = 0

    while cur < N:
        digit += 1
        cur = K ** digit - 1

    print(digit)


if __name__ == '__main__':
    main() import sys sys readline = sys.stdin.readline readline sys.stdin.readline sys.stdin sys stdin readline MOD = 10 ** 9 + 7 MOD 10 ** 9 + 7 10 ** 9 10 9 7 INF = float('INF') INF float('INF') float 'INF' sys.setrecursionlimit(10 ** 5) sys.setrecursionlimit sys setrecursionlimit 10 ** 5 10 5 def main():
    N, K = map(int, readline().split())

    digit = 0
    cur = 0

    while cur < N:
        digit += 1
        cur = K ** digit - 1

    print(digit) main N, K = map(int, readline().split()) N map(int, readline().split()) map int readline().split() ().split () readline split K digit = 0 digit 0 cur = 0 cur 0 while cur < N:
        digit += 1
        cur = K ** digit - 1

     cur < N cur N digit += 1 digit 1 cur = K ** digit - 1 cur K ** digit - 1 K ** digit K digit 1 print(digit) print digit if __name__ == '__main__':
    main() __name__ == '__main__' __name__ '__main__' main() main def main():
    N, K = map(int, readline().split())

    digit = 0
    cur = 0

    while cur < N:
        digit += 1
        cur = K ** digit - 1

    print(digit) def main():
    N, K = map(int, readline().split())

    digit = 0
    cur = 0

    while cur < N:
        digit += 1
        cur = K ** digit - 1

    print(digit) main MOD = 10 ** 9 + 7 10 ** 9 + 7 MOD INF = float('INF') float('INF') INF readline = sys.stdin.readline sys.stdin.readline readline
import sys

readline = sys.stdin.readline
MOD = 10 ** 9 + 7
INF = float('INF')
sys.setrecursionlimit(10 ** 5)


def main():
    N, K = map(int, readline().split())

    digit = 0
    cur = 0

    while cur < N:
        digit += 1
        cur = K ** digit - 1

    print(digit)


if __name__ == '__main__':
    main()
