import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		int x = 1;
		int ans = 0;
		while (N >= x) {
			x*= K;
			ans++;
		}
		if (ans == 0) ans = 1;
		if (K == 10) ans = String.valueOf(N).length();
		System.out.println(ans);
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		int x = 1;
		int ans = 0;
		while (N >= x) {
			x*= K;
			ans++;
		}
		if (ans == 0) ans = 1;
		if (K == 10) ans = String.valueOf(N).length();
		System.out.println(ans);
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		int x = 1;
		int ans = 0;
		while (N >= x) {
			x*= K;
			ans++;
		}
		if (ans == 0) ans = 1;
		if (K == 10) ans = String.valueOf(N).length();
		System.out.println(ans);
	} main {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		int x = 1;
		int ans = 0;
		while (N >= x) {
			x*= K;
			ans++;
		}
		if (ans == 0) ans = 1;
		if (K == 10) ans = String.valueOf(N).length();
		System.out.println(ans);
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int N = sc.nextInt(); N sc.nextInt() sc.nextInt sc int K = sc.nextInt(); K sc.nextInt() sc.nextInt sc int x = 1; x 1 int ans = 0; ans 0 while (N >= x) {
			x*= K;
			ans++;
		} N >= x N x {
			x*= K;
			ans++;
		} x*= K x K ans++ ans if (ans == 0) ans = 1; ans == 0 ans 0 ans = 1 ans 1 if (K == 10) ans = String.valueOf(N).length(); K == 10 K 10 ans = String.valueOf(N).length() ans String.valueOf(N).length() String.valueOf(N).length String.valueOf(N) String.valueOf String N System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		int x = 1;
		int ans = 0;
		while (N >= x) {
			x*= K;
			ans++;
		}
		if (ans == 0) ans = 1;
		if (K == 10) ans = String.valueOf(N).length();
		System.out.println(ans);
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		int x = 1;
		int ans = 0;
		while (N >= x) {
			x*= K;
			ans++;
		}
		if (ans == 0) ans = 1;
		if (K == 10) ans = String.valueOf(N).length();
		System.out.println(ans);
	}
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);
		int N = sc.nextInt();
		int K = sc.nextInt();
		int x = 1;
		int ans = 0;
		while (N >= x) {
			x*= K;
			ans++;
		}
		if (ans == 0) ans = 1;
		if (K == 10) ans = String.valueOf(N).length();
		System.out.println(ans);
	}
}