import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int k = sc.nextInt();

		int digit = 0;
		while (n >= k) {
			n = n / k;
			digit++;
		}

		if (n <= (k - 1)) {
			digit++;
		}

		System.out.println(digit);

		sc.close();
	}
} import java.util.Scanner; Scanner 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 digit = 0;
		while (n >= k) {
			n = n / k;
			digit++;
		}

		if (n <= (k - 1)) {
			digit++;
		}

		System.out.println(digit);

		sc.close();
	}
} Main public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int k = sc.nextInt();

		int digit = 0;
		while (n >= k) {
			n = n / k;
			digit++;
		}

		if (n <= (k - 1)) {
			digit++;
		}

		System.out.println(digit);

		sc.close();
	} main {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int k = sc.nextInt();

		int digit = 0;
		while (n >= k) {
			n = n / k;
			digit++;
		}

		if (n <= (k - 1)) {
			digit++;
		}

		System.out.println(digit);

		sc.close();
	} 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 digit = 0; digit 0 while (n >= k) {
			n = n / k;
			digit++;
		} n >= k n k {
			n = n / k;
			digit++;
		} n = n / k n n / k n k digit++ digit if (n <= (k - 1)) {
			digit++;
		} n <= (k - 1) n (k - 1) k 1 {
			digit++;
		} digit++ digit System.out.println(digit) System.out.println System.out System System.out digit sc.close() sc.close sc 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 digit = 0;
		while (n >= k) {
			n = n / k;
			digit++;
		}

		if (n <= (k - 1)) {
			digit++;
		}

		System.out.println(digit);

		sc.close();
	}
} public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int k = sc.nextInt();

		int digit = 0;
		while (n >= k) {
			n = n / k;
			digit++;
		}

		if (n <= (k - 1)) {
			digit++;
		}

		System.out.println(digit);

		sc.close();
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {

		Scanner sc = new Scanner(System.in);

		int n = sc.nextInt();
		int k = sc.nextInt();

		int digit = 0;
		while (n >= k) {
			n = n / k;
			digit++;
		}

		if (n <= (k - 1)) {
			digit++;
		}

		System.out.println(digit);

		sc.close();
	}
}
