from collections import deque, Counter as cnt

from collections import defaultdict as dd

from operator import itemgetter as ig

from bisect import bisect_right as bsr

from math import factorial, ceil, floor

import sys

sys.setrecursionlimit(1000000)



# お約束

args = None

INF = float("inf")

MOD = int(1e9 + 7)





def input(*ps):

    if type(ps[0]) is list:

        return [eval(input(*ps[0][:-1])) for _ in range(ps[0][-1])]

    elif len(ps) == 1:

        return ps[0](next(args))

    else:

        return [p(next(args)) for p in ps]





def nlist(n, v):

    if not n:

        return [] if type(v) is list else v

    return [nlist(n[1:], v) for _ in range(n[0])]





def yesno(v):

    print((["Yes", "No"][not v]))





def main():

    """エントリーポイント"""

    N, K = eval(input(int, int))

    n = N

    ans = 0

    while 1 < n:

        n //= K

        ans += 1

    print((ans + (n == 1)))





if __name__ == '__main__':

    args = iter(sys.stdin.read().split())

    main()

from collections import deque, Counter as cnt

from collections import defaultdict as dd

from operator import itemgetter as ig

from bisect import bisect_right as bsr

from math import factorial, ceil, floor

import sys

sys.setrecursionlimit(1000000)



# お約束

args = None

INF = float("inf")

MOD = int(1e9 + 7)





def input(*ps):

    if type(ps[0]) is list:

        return [eval(input(*ps[0][:-1])) for _ in range(ps[0][-1])]

    elif len(ps) == 1:

        return ps[0](next(args))

    else:

        return [p(next(args)) for p in ps]





def nlist(n, v):

    if not n:

        return [] if type(v) is list else v

    return [nlist(n[1:], v) for _ in range(n[0])]





def yesno(v):

    print((["Yes", "No"][not v]))





def main():

    """エントリーポイント"""

    N, K = eval(input(int, int))

    n = N

    ans = 0

    while 0 < n:

        n //= K

        ans += 1

    print(ans)





if __name__ == '__main__':

    args = iter(sys.stdin.read().split())

    main()

from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys

sys.setrecursionlimit(1000000)
# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [eval(input(*ps[0][:-1])) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v):
    print((["Yes", "No"][not v]))


def main():
    """エントリーポイント"""
    N, K = eval(input(int, int))
    n = N
    ans = 0
    while 1 < n:
        n //= K
        ans += 1
    print((ans + (n == 1)))


if __name__ == "__main__":
    args = iter(sys.stdin.read().split())
    main()

from collections import deque, Counter as cnt
from collections import defaultdict as dd
from operator import itemgetter as ig
from bisect import bisect_right as bsr
from math import factorial, ceil, floor
import sys

sys.setrecursionlimit(1000000)
# お約束
args = None
INF = float("inf")
MOD = int(1e9 + 7)


def input(*ps):
    if type(ps[0]) is list:
        return [eval(input(*ps[0][:-1])) for _ in range(ps[0][-1])]
    elif len(ps) == 1:
        return ps[0](next(args))
    else:
        return [p(next(args)) for p in ps]


def nlist(n, v):
    if not n:
        return [] if type(v) is list else v
    return [nlist(n[1:], v) for _ in range(n[0])]


def yesno(v):
    print((["Yes", "No"][not v]))


def main():
    """エントリーポイント"""
    N, K = eval(input(int, int))
    n = N
    ans = 0
    while 0 < n:
        n //= K
        ans += 1
    print(ans)


if __name__ == "__main__":
    args = iter(sys.stdin.read().split())
    main()

-    while 1 < n: +    while 0 < n: -    print((ans + (n == 1))) +    print(ans)