import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int k=sc.nextInt();

		if(k==10) {
			System.out.println(s.length());
		}else {
			long n=0;
			while(Math.pow(k,n)<Long.valueOf(s)+1) {
				n++;
			}
			System.out.println(n);
		}
	}
}
 import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int k=sc.nextInt();

		if(k==10) {
			System.out.println(s.length());
		}else {
			long n=0;
			while(Math.pow(k,n)<Long.valueOf(s)+1) {
				n++;
			}
			System.out.println(n);
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int k=sc.nextInt();

		if(k==10) {
			System.out.println(s.length());
		}else {
			long n=0;
			while(Math.pow(k,n)<Long.valueOf(s)+1) {
				n++;
			}
			System.out.println(n);
		}
	} main {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int k=sc.nextInt();

		if(k==10) {
			System.out.println(s.length());
		}else {
			long n=0;
			while(Math.pow(k,n)<Long.valueOf(s)+1) {
				n++;
			}
			System.out.println(n);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s=sc.next(); s sc.next() sc.next sc int k=sc.nextInt(); k sc.nextInt() sc.nextInt sc if(k==10) {
			System.out.println(s.length());
		}else {
			long n=0;
			while(Math.pow(k,n)<Long.valueOf(s)+1) {
				n++;
			}
			System.out.println(n);
		} k==10 k 10 {
			System.out.println(s.length());
		} System.out.println(s.length()) System.out.println System.out System System.out s.length() s.length s {
			long n=0;
			while(Math.pow(k,n)<Long.valueOf(s)+1) {
				n++;
			}
			System.out.println(n);
		} long n=0; n 0 while(Math.pow(k,n)<Long.valueOf(s)+1) {
				n++;
			} Math.pow(k,n)<Long.valueOf(s)+1 Math.pow(k,n) Math.pow Math k n Long.valueOf(s)+1 Long.valueOf(s) Long.valueOf Long s 1 {
				n++;
			} n++ n System.out.println(n) System.out.println System.out System System.out n String[] args args public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int k=sc.nextInt();

		if(k==10) {
			System.out.println(s.length());
		}else {
			long n=0;
			while(Math.pow(k,n)<Long.valueOf(s)+1) {
				n++;
			}
			System.out.println(n);
		}
	}
} public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int k=sc.nextInt();

		if(k==10) {
			System.out.println(s.length());
		}else {
			long n=0;
			while(Math.pow(k,n)<Long.valueOf(s)+1) {
				n++;
			}
			System.out.println(n);
		}
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		String s=sc.next();
		int k=sc.nextInt();

		if(k==10) {
			System.out.println(s.length());
		}else {
			long n=0;
			while(Math.pow(k,n)<Long.valueOf(s)+1) {
				n++;
			}
			System.out.println(n);
		}
	}
}

