import java.util.*;

public class Main {
	public static void main(final String[] args) {

        Scanner sc = new Scanner(System.in);

        // 整数N
        int num = sc.nextInt();
        // K進数
        int base = sc.nextInt();

        // 出力
        System.out.println(Integer.toString(num, base).length());
    }
} import java.util.*; util.* java public class Main {
	public static void main(final String[] args) {

        Scanner sc = new Scanner(System.in);

        // 整数N
        int num = sc.nextInt();
        // K進数
        int base = sc.nextInt();

        // 出力
        System.out.println(Integer.toString(num, base).length());
    }
} Main public static void main(final String[] args) {

        Scanner sc = new Scanner(System.in);

        // 整数N
        int num = sc.nextInt();
        // K進数
        int base = sc.nextInt();

        // 出力
        System.out.println(Integer.toString(num, base).length());
    } main {

        Scanner sc = new Scanner(System.in);

        // 整数N
        int num = sc.nextInt();
        // K進数
        int base = sc.nextInt();

        // 出力
        System.out.println(Integer.toString(num, base).length());
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int num = sc.nextInt(); num sc.nextInt() sc.nextInt sc int base = sc.nextInt(); base sc.nextInt() sc.nextInt sc System.out.println(Integer.toString(num, base).length()) System.out.println System.out System System.out Integer.toString(num, base).length() Integer.toString(num, base).length Integer.toString(num, base) Integer.toString Integer num base final String[] args args public class Main {
	public static void main(final String[] args) {

        Scanner sc = new Scanner(System.in);

        // 整数N
        int num = sc.nextInt();
        // K進数
        int base = sc.nextInt();

        // 出力
        System.out.println(Integer.toString(num, base).length());
    }
} public class Main {
	public static void main(final String[] args) {

        Scanner sc = new Scanner(System.in);

        // 整数N
        int num = sc.nextInt();
        // K進数
        int base = sc.nextInt();

        // 出力
        System.out.println(Integer.toString(num, base).length());
    }
} Main
import java.util.*;

public class Main {
	public static void main(final String[] args) {

        Scanner sc = new Scanner(System.in);

        // 整数N
        int num = sc.nextInt();
        // K進数
        int base = sc.nextInt();

        // 出力
        System.out.println(Integer.toString(num, base).length());
    }
}