H, A = map(int, input().split()) arr = [H] ans = 0 while arr: t = arr.pop()//A if t > 0: arr.append(t) arr.append(t) ans += 1 print(ans)