#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;
}