number, base = map(int, input().split())
result_list = []
while number / base > 0:
  mod = number % base
  result_list.append(str(mod))
  number = number // base

result_list.reverse()
result = "".join(result_list)
print(len(result)) number, base = map(int, input().split()) number map(int, input().split()) map int input().split() ().split () input split base result_list = [] result_list [] while number / base > 0:
  mod = number % base
  result_list.append(str(mod))
  number = number // base number / base > 0 number / base number base 0 mod = number % base mod number % base number base result_list.append(str(mod)) result_list.append result_list append str(mod) str mod number = number // base number number // base number base result_list.reverse() result_list.reverse result_list reverse result = "".join(result_list) result "".join(result_list) "".join "" join result_list print(len(result)) print len(result) len result result = "".join(result_list) "".join(result_list) result number, base = map(int, input().split()) map(int, input().split()) number base = map(int, input().split()) map(int, input().split()) base result_list = [] [] result_list mod = number % base number % base mod number = number // base number // base number
number, base = map(int, input().split())
result_list = []
while number / base > 0:
  mod = number % base
  result_list.append(str(mod))
  number = number // base

result_list.reverse()
result = "".join(result_list)
print(len(result))
