B - Digits Editorial /

Time Limit: 2 sec / Memory Limit: 1024 MB

配点 : 200

問題文

整数 NK 進数で表したとき、何桁になるかを求めてください。

注記

K 進表記については、Wikipedia「位取り記数法」を参照してください。

制約

  • 入力は全て整数である。
  • 1 \leq N \leq 10^9
  • 2 \leq K \leq 10

入力

入力は以下の形式で標準入力から与えられる。

N K

出力

整数 NK 進数で表したとき、何桁になるかを出力せよ。


入力例 1

11 2

出力例 1

4

112 進数で表記すると 1011 です。


入力例 2

1010101 10

出力例 2

7

入力例 3

314159265 3

出力例 3

18

Score : 200 points

Problem Statement

Given is an integer N. Find the number of digits that N has in base K.

Notes

For information on base-K representation, see Positional notation - Wikipedia.

Constraints

  • All values in input are integers.
  • 1 \leq N \leq 10^9
  • 2 \leq K \leq 10

Input

Input is given from Standard Input in the following format:

N K

Output

Print the number of digits that N has in base K.


Sample Input 1

11 2

Sample Output 1

4

In binary, 11 is represented as 1011.


Sample Input 2

1010101 10

Sample Output 2

7

Sample Input 3

314159265 3

Sample Output 3

18