#include <bits/stdc++.h>
using namespace std;
typedef long long ll;
int main() {
ll w,m,k,temp,cnt=0,tempm,var,ans=0,g;
cin>>w>>m>>k;
temp=m;
while(temp)
{
cnt++;
temp/=10;
}
temp=w;
tempm=m;
//cout<<INT_MAX<<endl;
while(1)
{
var=pow(10,cnt)-tempm;
//cout<<var<<endl;
g=1000000000000000000/var;
if(k*cnt>g)break;
var*=(k*cnt);
if(var>temp)break;
ans+=var/(k*cnt);
temp-=var;
tempm=pow(10,cnt);
cnt++;
}
// cout<<ans<<endl;
k*=cnt;
ans+=temp/k;
//if(w==10000000000000000 && m==1)ans+=1;
cout<<ans<<endl;
// your code goes here
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnR5cGVkZWYgIGxvbmcgbG9uZyBsbDsKCmludCBtYWluKCkgewoJbGwgdyxtLGssdGVtcCxjbnQ9MCx0ZW1wbSx2YXIsYW5zPTAsZzsKCWNpbj4+dz4+bT4+azsKCXRlbXA9bTsKCXdoaWxlKHRlbXApCgl7CgkJY250Kys7CgkJdGVtcC89MTA7Cgl9Cgl0ZW1wPXc7Cgl0ZW1wbT1tOwoJLy9jb3V0PDxJTlRfTUFYPDxlbmRsOwoJd2hpbGUoMSkKCXsKCQl2YXI9cG93KDEwLGNudCktdGVtcG07CgkJLy9jb3V0PDx2YXI8PGVuZGw7CgkJZz0xMDAwMDAwMDAwMDAwMDAwMDAwL3ZhcjsKCQlpZihrKmNudD5nKWJyZWFrOwoJCXZhcio9KGsqY250KTsKCQlpZih2YXI+dGVtcClicmVhazsKCQlhbnMrPXZhci8oaypjbnQpOwoJCXRlbXAtPXZhcjsKCQl0ZW1wbT1wb3coMTAsY250KTsKCQljbnQrKzsKCX0KLy8JY291dDw8YW5zPDxlbmRsOwoJayo9Y250OwoJYW5zKz10ZW1wL2s7CgkvL2lmKHc9PTEwMDAwMDAwMDAwMDAwMDAwICYmIG09PTEpYW5zKz0xOwoJY291dDw8YW5zPDxlbmRsOwoJCgkvLyB5b3VyIGNvZGUgZ29lcyBoZXJlCglyZXR1cm4gMDsKfQ==