import java.util.Scanner;

public class Main {
	public static void main(String... args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		int d = (int)Math.ceil(Math.log10(n + 1) / Math.log10(k));
		System.out.println(d);
		scan.close();
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String... args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		int d = (int)Math.ceil(Math.log10(n + 1) / Math.log10(k));
		System.out.println(d);
		scan.close();
	}
} Main public static void main(String... args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		int d = (int)Math.ceil(Math.log10(n + 1) / Math.log10(k));
		System.out.println(d);
		scan.close();
	} main {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		int d = (int)Math.ceil(Math.log10(n + 1) / Math.log10(k));
		System.out.println(d);
		scan.close();
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int n = scan.nextInt(); n scan.nextInt() scan.nextInt scan int k = scan.nextInt(); k scan.nextInt() scan.nextInt scan int d = (int)Math.ceil(Math.log10(n + 1) / Math.log10(k)); d (int)Math.ceil(Math.log10(n + 1) / Math.log10(k)) Math.ceil Math Math.log10(n + 1) / Math.log10(k) Math.log10(n + 1) Math.log10 Math n + 1 n 1 Math.log10(k) Math.log10 Math k System.out.println(d) System.out.println System.out System System.out d scan.close() scan.close scan String... args args public class Main {
	public static void main(String... args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		int d = (int)Math.ceil(Math.log10(n + 1) / Math.log10(k));
		System.out.println(d);
		scan.close();
	}
} public class Main {
	public static void main(String... args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		int d = (int)Math.ceil(Math.log10(n + 1) / Math.log10(k));
		System.out.println(d);
		scan.close();
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String... args) {
		Scanner scan = new Scanner(System.in);
		int n = scan.nextInt();
		int k = scan.nextInt();

		int d = (int)Math.ceil(Math.log10(n + 1) / Math.log10(k));
		System.out.println(d);
		scan.close();
	}
}