We'll define S(n) for positive integer n as follows: the number of the n's digits in the decimal base. For example, S(893) = 3, S(114514) = 6.

You want to make a consecutive integer sequence starting from number m (m, m + 1, ...). But you need to pay S(n)·k to add the number n to the sequence.

You can spend a cost up to w, and you want to make the sequence as long as possible. Write a program that tells sequence's maximum length.

Input

The first line contains three integers w (1 ≤ w ≤ 1016), m (1 ≤ m ≤ 1016), k (1 ≤ k ≤ 109).

Please, do not write the %lld specifier to read or write 64-bit integers in C++. It is preferred to use the cin, cout streams or the %I64d specifier.

Output

The first line should contain a single integer — the answer to the problem.

Examples

Input

9 1 1


Output

9


Input

77 7 7


Output

7


Input

114 5 14


Output

6


Input

1 1 2


Output

0
import java.io.*;
import java.util.*;
public final class making_sequence
{
    static FastScanner sc=new FastScanner(new BufferedReader(new InputStreamReader(System.in)));
    static PrintWriter out=new PrintWriter(System.out);
	static long w,m,k;
	static long[] arr;
	
	static boolean check(long mid)
	{
		long start=m,end=m+mid-1;
		long amt=0;
		while(start<=end)
		{
			int pos=Arrays.binarySearch(arr,start);
			if(pos<0)
			{
				pos++;
				pos*=-1;
			}
			long nxt=Math.min(end,arr[pos]);
			long curr1=nxt-start+1,curr2=Long.toString(nxt).length();
			amt+=(curr1*curr2);
			start=nxt+1;
		}
		return amt<=w;
	}
	
	static void build()
	{
		arr=new long[18];
		long num=10;
		for(int i=0;i<18;i++)
		{
			arr[i]=num-1;
			num*=10;
		}
	}
	
	public static void main(String args[]) throws Exception
	{
		w=sc.nextLong();m=sc.nextLong();k=sc.nextLong();
		w/=k;
		long low=0,high=(long)Math.pow(10,16);
		build();
		while(low<high)
		{
			long mid=(low+high+1)>>1;
			//out.println(low+" "+high);
			if(check(mid))
			{
				low=mid;
			}
			else
			{
				high=mid-1;
			}
		}
		out.println(low);
		out.close();
	}
}
class FastScanner
{
    BufferedReader in;
    StringTokenizer st;

    public FastScanner(BufferedReader in) {
        this.in = in;
    }
	
    public String nextToken() throws Exception {
        while (st == null || !st.hasMoreTokens()) {
            st = new StringTokenizer(in.readLine());
        }
        return st.nextToken();
    }
	
	public String next() throws Exception {
		return nextToken().toString();
	}
	
    public int nextInt() throws Exception {
        return Integer.parseInt(nextToken());
    }

    public long nextLong() throws Exception {
        return Long.parseLong(nextToken());
    }

    public double nextDouble() throws Exception {
        return Double.parseDouble(nextToken());
    }
}