#include <bits/stdc++.h>
using namespace std;
#define ll long long
#define ull unsigned long long
#define fastio ios_base::sync_with_stdio(0); cin.tie(0); cout.tie(0);
#define fread(p) freopen(p,"r",stdin);
#define fwrite(p) freopen(p,"w",stdout);
#define pii pair<int, int>
#define pll pair<ll, ll>
#define pb push_back
#define mem(s,k) memset(s, k, sizeof(s))

////--- Graph Moves---////
//const ll xx[] = {0,0,1,-1};
//const ll yy[] = {1,-1,0,0};
//const ll xx_king[] = {0,0,1,-1,1,1,-1,-1};
//const ll yy_king[] = {1,-1,0,0,1,-1,1,-1};
//const ll xx_knight[]= {-2,-1,1,2,2,1,-1,-2};
//const ll yy_knight[]= {1,2,2,1,-1,-2,-2,-1};
////------------------////

int main()
{
//    fwrite("a.txt");
    double t,s,q, cnt=0;
    cin >> t >> s >> q;
    double r=t-s, d, i,j, x=(q-1)/q;
    while(r>0)
    {
//        cout << "he " << r << endl;
        cnt++;
        for(i=0, j=s; i<j && r>0; )
        {
            if(i==j) break;
//            printf("%.12f %.12f %.6f\n",i,j,r);
            i++;
            j += x;
            r = t-j;
        }
        s = j;
    }
//    while(s<t)
//        cnt++, s*=q;
    cout << cnt << endl;
}
