#include<stdio.h>
typedef long long ll;
ll get(ll a)
{
ll ret=0;
ll now=1;
ll t=1;
for(;;)
{
if(now*10>a)
{
ret+=(a-now+1)*t;
break;
}
ret+=now*9*t;
now*=10;
t++;
}
return ret;
}
int main()
{
ll gen,st,tim;
scanf("%I64d%I64d%I64d",&gen,&st,&tim);
gen/=tim;
ll beg=st-1,end=20000000000000000LL;
for(;;)
{
ll med=(beg+end)/2+1;
if(get(med)-get(st-1)>gen)
{
end=med-1;
}
else
{
beg=med;
}
if(beg==end)
{
printf("%I64d\n",beg-st+1);
break;
}
}
}
I2luY2x1ZGU8c3RkaW8uaD4KdHlwZWRlZiBsb25nIGxvbmcgbGw7CmxsIGdldChsbCBhKQp7CiAgICBsbCByZXQ9MDsKICAgIGxsIG5vdz0xOwogICAgbGwgdD0xOwogICAgZm9yKDs7KQogICAgewogICAgICAgIGlmKG5vdyoxMD5hKQogICAgICAgIHsKICAgICAgICAgICAgcmV0Kz0oYS1ub3crMSkqdDsKICAgICAgICAgICAgYnJlYWs7CiAgICAgICAgfQogICAgICAgIHJldCs9bm93KjkqdDsKICAgICAgICBub3cqPTEwOwogICAgICAgIHQrKzsKICAgIH0KICAgIHJldHVybiByZXQ7Cn0KaW50IG1haW4oKQp7CiAgICBsbCBnZW4sc3QsdGltOwogICAgc2NhbmYoIiVJNjRkJUk2NGQlSTY0ZCIsJmdlbiwmc3QsJnRpbSk7CiAgICBnZW4vPXRpbTsKICAgIGxsIGJlZz1zdC0xLGVuZD0yMDAwMDAwMDAwMDAwMDAwMExMOwogICAgZm9yKDs7KQogICAgewogICAgICAgIGxsIG1lZD0oYmVnK2VuZCkvMisxOwogICAgICAgIGlmKGdldChtZWQpLWdldChzdC0xKT5nZW4pCiAgICAgICAgewogICAgICAgICAgICBlbmQ9bWVkLTE7CiAgICAgICAgfQogICAgICAgIGVsc2UKICAgICAgICB7CiAgICAgICAgICAgIGJlZz1tZWQ7CiAgICAgICAgfQogICAgICAgIGlmKGJlZz09ZW5kKQogICAgICAgIHsKICAgICAgICAgICAgcHJpbnRmKCIlSTY0ZFxuIixiZWctc3QrMSk7CiAgICAgICAgICAgIGJyZWFrOwogICAgICAgIH0KICAgIH0KfQ==