import collections
import itertools
import functools
import math
import re
import bisect
import random

rint = lambda: int(input())
rstr = lambda: input()
rints = lambda: list(map(int, input().split()))
rstrs = lambda: input().split()
wmat = lambda n, mat, sep: '{}\n{}'.format(n, '\n'.join(sep.join(map(str, row)) for row in mat))
warr = lambda n, arr, sep: '{}\n{}'.format(n, sep.join(map(str, arr)))
wl = lambda sep, *arr: sep.join(map(str, arr))

def main():
    P = rint()
    N = rint()
    R = rint()

    if R == 1:
        print(P // N)
        return
    
    total = 0
    for i in itertools.count():
        total += N
        N *= R

        if total > P:
            print(i)
            break

if __name__ == '__main__':
    main()


