import math
a, b = map(int, input().split())
N = 0
i = 1
c = 0
while c >= 0:
  c = a - b**i
  i += 1
  N += 1
print(N) import math math a, b = map(int, input().split()) a map(int, input().split()) map int input().split() ().split () input split b N = 0 N 0 i = 1 i 1 c = 0 c 0 while c >= 0:
  c = a - b**i
  i += 1
  N += 1 c >= 0 c 0 c = a - b**i c a - b**i a b**i b i i += 1 i 1 N += 1 N 1 print(N) print N a, b = map(int, input().split()) map(int, input().split()) a i = 1 1 i c = 0 0 c N = 0 0 N c = a - b**i a - b**i c b = map(int, input().split()) map(int, input().split()) b N += 1 1 N i += 1 1 i
import math
a, b = map(int, input().split())
N = 0
i = 1
c = 0
while c >= 0:
  c = a - b**i
  i += 1
  N += 1
print(N)
