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.InputStream;
import java.io.OutputStreamWriter;
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.InputMismatchException;
import java.util.LinkedList;
import java.util.Queue;

import javax.security.auth.callback.LanguageCallback;

import java.io.BufferedWriter;
import java.io.IOException;

/*

95 999999999999999 1

 */




public class Main
{
	static long a,b,c,d,e,f,t,l,r,v,n,m,k,x,y,res=0,len,pow;
	static StringBuilder sb,sb1,sb2;
	static String s;
	static long ar[] = new long[100009];
	static long cumu[] = new long[100009];
	static int dis[][] = new int[9][9];
	//static long cumu[] = new long[150009];
	static ArrayList<Long> vi = new ArrayList<>();
	boolean fl = true;
	

	public static void main(String[] args)throws IOException
	{
		MainFastScan scanner = new MainFastScan();
		MainFastPrint printer = new MainFastPrint();
		
		long cst = scanner.nextLong();
		long num = scanner.nextLong();
		long k = scanner.nextLong();
		
		long tmp = num, dig = 0, upten=1;
		
		while(tmp>0) {dig++; tmp/=10; upten*=10;}
		long lb=0,ub=0;
		long res = 0;
		while(true)
		{
			long range = (upten-num);
			if((double)(range*dig)<(double)(cst/k))
			{
				cst -= range*dig*k;
				num = upten;
				upten*=10;
				res += range;
				dig++;
			}
			else 
			{
				lb = num;
				ub = upten;
				break;
			}
		}
		
		//System.out.println(lb + " " +ub + " " + res);
		long lbc = lb, ubc = ub;
		long ans = 0;
		//System.out.println(cst);
		while (lb<=ub) {
			long gs = (lb+ub)/2;
			if((double)((gs-lbc)*dig) <= (double)cst/k) {ans = gs-lbc; lb=gs+1; }
			else ub = gs-1;
			//System.out.println((gs-lbc)*dig*k + " " + gs);
		}
		
		res += ans;
		//System.out.println(ans + " " + res);
		printer.print(Long.toString(res));
		printer.print("\n");
		printer.close();
	}
}


class MainFastPrint
{
	private final BufferedWriter bw;
	public MainFastPrint(){bw=new BufferedWriter(new OutputStreamWriter(System.out));}
	public void print(String str)throws IOException{bw.append(str);}
	public void printLine(String str)throws IOException{print(str); bw.append("\n");}
	public void close()throws IOException{bw.close();}
	public void flush() throws IOException {bw.flush();}
}

class MainFastScan
{
	private byte[] buf=new byte[1024];
	private int index;
	private InputStream in;
	private int total;
	public MainFastScan()
	{
		in=System.in;
	}
	public int scan()throws IOException
	{
		if(total<0)
			throw new InputMismatchException();
		if(index>=total)
		{
			index=0;
			total=in.read(buf);
			if(total<=0)
				return -1;
		}
		return buf[index++];
	}
	public int nextInt()throws IOException
	{
		int integer=0;
		int n=scan();
		while(isWhiteSpace(n)) n=scan();
		int neg=1;
		if(n=='-')
		{
			neg=-1;
			n=scan();
		}
		while(!isWhiteSpace(n))
		{
			if(n>='0'&&n<='9')
			{
				integer*=10;
				integer+=n-'0';
				n=scan();
			}
			else throw new InputMismatchException();
		}
		return neg*integer;
	}

	public long nextLong()throws IOException
	{
		long res=0;
		int n = scan();
		while(isWhiteSpace(n)) n=scan();
		int neg=1;
		if(n=='-')
		{
			neg=-1;
			n=scan();
		}
		while(!isWhiteSpace(n))
		{
			if(n>='0'&&n<='9')
			{
				res *= 10;
				res += n-'0';
				n=scan();
			}
			else throw new InputMismatchException();
		}
		return neg*res;
	}

	public double nextDouble()throws IOException
	{
		double doub=0;
		int n=scan();
		while(isWhiteSpace(n)) n=scan();
		int neg=1;
		if(n=='-')
		{
			neg=-1;
			n=scan();
		}
		while(!isWhiteSpace(n)&&n!='.')
		{
			if(n>='0'&&n<='9')
			{
				doub*=10;
				doub+=n-'0';
				n=scan();
			}
			else throw new InputMismatchException();
		}
		if(n=='.')
		{
			n=scan();
			double temp=1;
			while(!isWhiteSpace(n))
			{
				if(n>='0'&&n<='9')
				{
					temp/=10;
					doub+=(n-'0')*temp;
					n=scan();
				}
				else throw new InputMismatchException();
			}
		}
		return doub*neg;
	}
	public String nextWord()throws IOException
	{
		StringBuilder sb=new StringBuilder();
		int n=scan();
		while(isWhiteSpace(n)) n=scan();
		while(!isWhiteSpace(n))
		{
			sb.append((char)n);
			n=scan();
		}
		return sb.toString();
	}
	public String nextLine()throws IOException
	{
		StringBuilder sb=new StringBuilder();
		int n=scan();
		while(isWhiteSpaceLine(n)) n=scan();
		while(!isWhiteSpaceLine(n))
		{
			sb.append((char)n);
			n=scan();
		}
		return sb.toString();
	}
	private boolean isWhiteSpace(int n)
	{
		if(n==' '||n=='\n'||n=='\r'||n=='\t'||n==-1)
			return true;
		return false;
	}
	private boolean isWhiteSpaceLine(int n)
	{
		if(n=='\n'||n=='\r'||n=='\t'||n==-1)
			return true;
		return false;
	}
}