Problem2285--Slimes

2285: Slimes

[Creator : ]
Time Limit : 1.000 sec  Memory Limit : 128 MB

Description

Time Limit: 2 sec / Memory Limit: 1024 MB

Score : 200200 points

Problem Statement

There are AA slimes.
Each time Snuke shouts, the slimes multiply by KK times.
In order to have BB or more slimes, at least how many times does Snuke need to shout?

Constraints

  • 1 \leq A \leq B \leq 10^91AB109
  • 2 \leq K \leq 10^92K109
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:
AABBKK

Output

Print the answer.

Sample Input Copy

1 4 2

Sample Output Copy

2

HINT

We start with one slime. After Snuke's first shout, we have two slimes; after his second shout, we have four slimes. Thus, he needs to shout at least twice to have four or more slimes.

Source/Category