import java.util.*;

public class Main {

	@SuppressWarnings("resource")
	void run() {

		//
		// 画面入力
		//
		Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	int k = sc.nextInt();

    	int digit = 1;
    	for(int i = 1; n - Math.pow(k, i) >= 0; i++){
    		digit = i + 1;
    	}
    	System.out.println(digit);

	}
	
    public static void main(String[] args) {
        new Main().run();
    }
} import java.util.*; util.* java public class Main {

	@SuppressWarnings("resource")
	void run() {

		//
		// 画面入力
		//
		Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	int k = sc.nextInt();

    	int digit = 1;
    	for(int i = 1; n - Math.pow(k, i) >= 0; i++){
    		digit = i + 1;
    	}
    	System.out.println(digit);

	}
	
    public static void main(String[] args) {
        new Main().run();
    }
} Main @SuppressWarnings("resource")
	void run() {

		//
		// 画面入力
		//
		Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	int k = sc.nextInt();

    	int digit = 1;
    	for(int i = 1; n - Math.pow(k, i) >= 0; i++){
    		digit = i + 1;
    	}
    	System.out.println(digit);

	} run {

		//
		// 画面入力
		//
		Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	int k = sc.nextInt();

    	int digit = 1;
    	for(int i = 1; n - Math.pow(k, i) >= 0; i++){
    		digit = i + 1;
    	}
    	System.out.println(digit);

	} 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 = 1; digit 1 for(int i = 1; n - Math.pow(k, i) >= 0; i++){
    		digit = i + 1;
    	} int i = 1; int i = 1; i 1 n - Math.pow(k, i) >= 0 n - Math.pow(k, i) n Math.pow(k, i) Math.pow Math k i 0 i++ i++ i {
    		digit = i + 1;
    	} {
    		digit = i + 1;
    	} digit = i + 1 digit i + 1 i 1 System.out.println(digit) System.out.println System.out System System.out digit public static void main(String[] args) {
        new Main().run();
    } main {
        new Main().run();
    } new Main().run() new Main().run new Main() String[] args args public class Main {

	@SuppressWarnings("resource")
	void run() {

		//
		// 画面入力
		//
		Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	int k = sc.nextInt();

    	int digit = 1;
    	for(int i = 1; n - Math.pow(k, i) >= 0; i++){
    		digit = i + 1;
    	}
    	System.out.println(digit);

	}
	
    public static void main(String[] args) {
        new Main().run();
    }
} public class Main {

	@SuppressWarnings("resource")
	void run() {

		//
		// 画面入力
		//
		Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	int k = sc.nextInt();

    	int digit = 1;
    	for(int i = 1; n - Math.pow(k, i) >= 0; i++){
    		digit = i + 1;
    	}
    	System.out.println(digit);

	}
	
    public static void main(String[] args) {
        new Main().run();
    }
} Main
import java.util.*;

public class Main {

	@SuppressWarnings("resource")
	void run() {

		//
		// 画面入力
		//
		Scanner sc = new Scanner(System.in);
    	int n = sc.nextInt();
    	int k = sc.nextInt();

    	int digit = 1;
    	for(int i = 1; n - Math.pow(k, i) >= 0; i++){
    		digit = i + 1;
    	}
    	System.out.println(digit);

	}
	
    public static void main(String[] args) {
        new Main().run();
    }
}